I have a json array like the picture below 
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
jsonArray = jsonArray.filter(item => !item.position.includes(null))
Or
jsonArray = jsonArray.filter(item => item.position[0] !== null && item.position[1] !== null)
jsonArray = jsonArray.filter(item => item.position[0] !== null && item.position[1] !== null) to be precise.[] === null would always return false. The closest you can get is check whether that list includes null which I've updated my answer to show that too.We can use a library lodash and using filter method, like this:
var items = _.filter(items, function(item){return item.position});
or
var items = _.filter(items, function(item){return item.position !== null && item.position !== ""});
we can filter out objects which do have position null
Try this code:
const filtered = array.filter(items => items.position[0] != null || items.position[1] != null);
console.log(filtered);