So I'm currently fetching data from an API but the data I'm getting is very weird. For example if I want to get the temperature, humidity and date from the API for 1 specific location I will get something like this:
data: {temp="15",humidity=null,date=null,lat=50,long=5}
data: {temp=null,humidity="7",date=null,lat=50,long=5}
data: {temp=null,humidity=null,date="20190417",lat=50,long=5}
So it seems the API fetches everything individual, but instead of grouping it all together and sending 1 array it sends an array for every piece of information I request. Is it possible to take the relevant data out of each array and put it into 1 for each request I do? I would like to do the grouping with Javascript or JQuery. I know normally you have to post what you tried, but honestly at the moment I'm at a complete loss, just a starting point on how to tackle the problem would be nice.
Expected result
data: {temp="15",humidity="7",date="20190417",lat=50,long=5}