make a dimensional array from object

I get this data from the backend "procedure_word_count" = [{"slug":"new","name":"New","count":1},{"slug":"no-need","name":"No Need","count":2},{"slug":"why","name":"Why","count":2}] My goal is to … Read more make a dimensional array from object

I get this data from the backend

"procedure_word_count" = [{"slug":"new","name":"New","count":1},{"slug":"no-need","name":"No Need","count":2},{"slug":"why","name":"Why","count":2}]

My goal is to create a dimensional array that extracts the name and count from the "procedure_word_count"

let newArray = "[['New', 1], ['No Need', 2], ['Why', 2]]"

Source: JavaSript – Stack Overflow


Categories: NewsTags:

Tags:


Leave a Reply

Your email address will not be published. Required fields are marked *