Breaking down message sequence to seperate elements

Hi all

I would like to send caller number and call time to google sheets via nodered.

My Tasker app uses a get request to send caller number and unix time as a combined string separated by a comma.
The HTTP node returns an object; {data:"027522000,1769366895"}
And that is where I get lost, would the best route be a function that splits at the comma and assigns to string variables or use nodes?
So far after endless searching I have two split nodes giving a message sequence of separate strings but unable to get my head around using msg.parts.index (does it need a suffix in square brackets ?) to get new individual msgs
Have read working with a messages but cannot find specifics on message sequences, most AI responses seem to deal with rejoining sequences after manipulation but are vague on processing.
Hope someone can help .
Thanks

[{"id":"fd16d8ce2d4fe245","type":"tab","label":"Flow 2","disabled":false,"info":"","env":[]},{"id":"7cb825869847fde1","type":"http in","z":"fd16d8ce2d4fe245","name":"","url":"update","method":"get","upload":false,"skipBodyParsing":false,"swaggerDoc":"","x":130,"y":160,"wires":[["a85986764eb8e4bd","59f574fe33fca39f","e63ab697d6e3a489"]]},{"id":"a85986764eb8e4bd","type":"http response","z":"fd16d8ce2d4fe245","name":"","statusCode":"","headers":{},"x":330,"y":240,"wires":[]},{"id":"12d8c37fd2f44dfe","type":"debug","z":"fd16d8ce2d4fe245","name":"debug 3","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":680,"y":160,"wires":[]},{"id":"59f574fe33fca39f","type":"split","z":"fd16d8ce2d4fe245","name":"","splt":",","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","property":"payload","x":330,"y":160,"wires":[["0cdcbfc4eab7092b"]]},{"id":"e63ab697d6e3a489","type":"debug","z":"fd16d8ce2d4fe245","name":"debug 4","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":680,"y":100,"wires":[]},{"id":"0cdcbfc4eab7092b","type":"split","z":"fd16d8ce2d4fe245","name":"","splt":",","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","property":"payload","x":490,"y":160,"wires":[["12d8c37fd2f44dfe"]]}]

You could use a csv node to extract number and timestamp

[{"id":"25938fe4f4d37f14","type":"inject","z":"fd16d8ce2d4fe245","name":"endpoint data","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"data\":\"027522000,1769366895\"}","payloadType":"json","x":90,"y":160,"wires":[["dfb8a8462826e843"]]},{"id":"dfb8a8462826e843","type":"change","z":"fd16d8ce2d4fe245","name":"","rules":[{"t":"move","p":"payload.data","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":310,"y":160,"wires":[["b87b466143853734"]]},{"id":"b87b466143853734","type":"csv","z":"fd16d8ce2d4fe245","name":"","spec":"rfc","sep":",","hdrin":"","hdrout":"none","multi":"one","ret":"\\r\\n","temp":"number,timestamp","skip":"0","strings":true,"include_empty_strings":"","include_null_values":"","x":490,"y":160,"wires":[["12d8c37fd2f44dfe"]]},{"id":"12d8c37fd2f44dfe","type":"debug","z":"fd16d8ce2d4fe245","name":"debug 3","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":680,"y":160,"wires":[]}]

Or better still have tasker send a properly constructed JSON

{"number": "027522000", "timestamp": 1769366895}

Then the http in node could parse it with no other node required.

Any reason for not using the google sheets node?

Hi
Thanks for reply.

Not being that familiar with programming generally, I used the simplest method (to me) in Tasker
of attaching data to the URL (?%CNUM=,%TIMES) rather than constructing a post request.
I also would like to get the information as variables to process further.
Will study the CSV node.

Cheers

Appreciate the response.
Would I still have to split the string and assign variables?
The idea behind this is a simple entry system, call a mobile number and the strike plate opens for a couple of seconds, the number can be compared to a approved list and the time can be recorded. There used to be garage door systems the took a sim that did something similar(always talk of no network charges and illegal use of power). I suppose you could use Tasker to access the sheets API direct but having nodered in the mix gives other opportunities.

Thanks

Thank you, used the csv and then a change node to assign the flow variables, now to work on the google sheet node.
If anyone has the time ? While trying different ways to get this working i noticed that the json node put the key part of a pair in quotation marks and then the split node worked slightly differently, whats the reasoning behind quotation or no quotation around the key.
Also a simple object pair like {data : "xxxx"} what javascript in a function would assign xxx to a string variable.

Thanks again for your help with this.

That is how JSON is formatted see What is JSON