How to get the name of the massive keywords?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
8 views
$required.forEach(function(items){ items = JSON.stringify(items); console.log(items); });

conclusion:
{"phone":"required"}
how to get the name of the first element = phone (it is dynamic)
by | 8 views

1 Answer

0 like 0 dislike
console.log(Object.keys(items));
If I understand You correctly.
UPD
console.log(Object.values(items))
Or, if you have an array of objects:
console.log(Object.values(items)[0]);
by

Related questions

110,608 questions
257,186 answers
0 comments
35,649 users