Is there a way to check if my object contain array? for example:
let object1 = {
name:'abc',
items:[
{item_name:'123'},
{item_name:'456'}
]
}
Imagine object1 is coming from server and I am not sure that it will or will not (or even have more) array in it. Is there a proper way to do this?
itemsarray in it? Or just any array?{ foo: { bar: [1,2,3] } }?