I have a JSON string as:
var Str="[{ 'label': 'Month'},{ label: 'within'},{ label: 'From'},
{ label: 'Where'},]";
I converted it into an objects by eval:
var tagString = eval(Str);
I want to get the index of month without a loop.
Is there a better way to get the index of an object in an array without using loops?
Thanks in advance!
JSON.parseanyway, noteval...fororwhile, as in my answer.