how can i convert this
[{"name":"All"},{"name":"NodeJS"},{"name":"ReactJS"},{"name":"PHP"},{"name":"Wordpress"},{"name":"Joomla"}]
In this
["All", "NodeJS", "ReactJS", "PHP", "Wordpress", "Joomla"]
It may be a very simple thing but I have no idea how to do it
You just need to use the function
Array#map
:You have to access the attribute by
name
looping withforeach
With this code, the values are stored in
a
I suppose that what you want is to take from json to a js obj and not even fix it I will give you an example:
where you get the json:
Hope this can help you.