How to get all objects of same type inside an array in Javascript? How to get all objects of same type inside an array in Javascript? json json