Modifying payloads help

Drawing a blank here…
I have the following payload:
image

But I want it combined as:

“query”
0: deviceId=xxxx
-station=1
1: deviceId=xxxxx
station=1

if that makes sense

@Lars_Andersson,

You’re looking to take the payload that you sent along in that screenshot, and manipulate it to look like:

{
    "query": [
        0: {
           "deviceId": <some device id>,
           "station": 1
        },
        1: {
           "deviceId": <some device id>,
           "station": 1
        }
    ]
}

Do I understand that correctly?

yes, correct.
Is a function node my only option?

@Lars_Andersson,

Yes, for this kind of payload modification, a Function Node is going to be your best option.

Any example of how I would do that?