Get all object keys even if multiple







Hi guys

I have e.g. the following Object

PHP Code:


var obj={title:'My Title',headline:'Headlinestring',content:'Xyz',image:'imageurl',content:'KJH'


As you see, the key content comes multiple times (so its an array)

if i go with obj.keys(), it gets me this: title,headline,content,image

Key content comes only ones (Yes i know its an array) But i need my list comes back like this:

title,headline,content,image,content

The object comes from a xml2json…

Read the entire article at the source link…


We're happy to share this resource that we found. The content displayed on this page is property of it's original author and/or their organization.

Leave a Reply