I have an array of objects in javascript. Something similar to this :
var objectArray = [
{ "Name" : "A", "Id" : "1" },
{ "Name" : "B", "Id" : "2" },
{ "Name" : "C", "Id" : "3" },
{ "Name" : "D", "Id" : "4" }
];
Now i am trying to find out whether an object with a given property Name
value exist in the array or not through in built function like inArray
, indexOf
etc. Means if i have only a string C
than is this possible to check whether an obejct with property Name C exist in the array or not with using inbuilt functions like indexOf, inArray etc ?