what does the object look like if you console.log it? It might have some method that gives you the properties. I remember seeing something where you could input a field name as a string to get its value, so there must be a way to get the list of possible keys.
Once you have things set up like this you can get to the code and you could retrieve a list of all properties like this
//get all keys
const keyList = properties.things.listProperties()
//bring in the actual data
const allThings = properties.things.get(0, properties.things.length())
//create a Json representation of your data input
const jsonDataArray = allThings.map(x => {
let obj = {}
keyList.forEach(y => {
Object.assign(obj, {
y: x.get(y)
})
})
return obj
})