I am trying to loop through an object array (data.list) and pull out an element (required_fields.display_value) and push them into another array and concatenate.
I've written the following:
c.data.required_fields = [];
for(var i=0; i<c.data.list.length; i++) {
c.data.required_fields.push(
c.data.list[i].required_fields.display_value.split(',')
);
}
What do I have to add to my code above so that required_fields is a single array? Thanks!