Remove entire object from a json array javascript

I have a json array like the picture below enter image description here

The position for marker 1 is Null, how can i remove the entire marker 1 object from the array so i only have marker 2,3 and 4 left in the array ? thank you


Solution 1:

jsonArray = jsonArray.filter(item => !item.position.includes(null))

Or

jsonArray = jsonArray.filter(item => item.position[0] !== null && item.position[1] !== null)