How to parse JSON object to value

Hi @Steve-Mcl and everyone,

Please help and advise how to parse JSON object to value.

Expected value is need data timings value of sunrise, sunset, midnight and date readable

Already try to create a flow and have error messages.

Is it possible to use buffer parser node to parse this JSON object.

Let you know the flow below

[{"id":"a2dd2b1909247949","type":"tab","label":"Flow 2","disabled":false,"info":"","env":[]},{"id":"2980903373f6c1c2","type":"http request","z":"a2dd2b1909247949","name":"","method":"GET","ret":"obj","paytoqs":"ignore","url":"https://api.aladhan.com/v1/timings?latitude=40.7145672345337&longitude=-74.00297622685953&method=99&methodSettings=20.0,null,18.0","tls":"","persist":false,"proxy":"","authType":"","senderr":false,"x":330,"y":160,"wires":[["42ac0f7f17df623b","110c54a20c895895"]]},{"id":"110c54a20c895895","type":"buffer-parser","z":"a2dd2b1909247949","name":"","data":"payload","dataType":"json","specification":"spec","specificationType":"ui","items":[{"type":"string","name":"Date Readable","offset":0,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"string","name":"Timings Sunrise","offset":1,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"string","name":"Timings Sunset","offset":2,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"string","name":"Timings Midnight","offset":3,"length":1,"offsetbit":0,"scale":"1","mask":""}],"swap1":"","swap2":"","swap3":"","swap1Type":"swap","swap2Type":"swap","swap3Type":"swap","msgProperty":"payload","msgPropertyType":"str","resultType":"object","resultTypeType":"return","multipleResult":true,"fanOutMultipleResult":true,"setTopic":true,"outputs":4,"x":550,"y":160,"wires":[["8e932711aecb661c"],["e0cd13c63762cb24"],["67e5e0116617c244"],["d1d17c74a65db949"]]},{"id":"42ac0f7f17df623b","type":"debug","z":"a2dd2b1909247949","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":510,"y":80,"wires":[]},{"id":"7a7e32fbaf64babd","type":"inject","z":"a2dd2b1909247949","name":"","props":[],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":170,"y":160,"wires":[["2980903373f6c1c2"]]},{"id":"8e932711aecb661c","type":"debug","z":"a2dd2b1909247949","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":770,"y":80,"wires":[]},{"id":"e0cd13c63762cb24","type":"debug","z":"a2dd2b1909247949","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":770,"y":140,"wires":[]},{"id":"67e5e0116617c244","type":"debug","z":"a2dd2b1909247949","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":770,"y":200,"wires":[]},{"id":"d1d17c74a65db949","type":"debug","z":"a2dd2b1909247949","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":770,"y":260,"wires":[]}]

Why would you need a buffer parser when your http request returns a object.
You need to read this page and pay attention to When you hover over any element, a set of buttons appear on the right: This will show you how to get the paths to the valuesfrom your object.

https://nodered.org/docs/user-guide/messages

[{"id":"7a7e32fbaf64babd","type":"inject","z":"a2dd2b1909247949","name":"","props":[],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":170,"y":160,"wires":[["2980903373f6c1c2"]]},{"id":"2980903373f6c1c2","type":"http request","z":"a2dd2b1909247949","name":"","method":"GET","ret":"obj","paytoqs":"ignore","url":"https://api.aladhan.com/v1/timings?latitude=40.7145672345337&longitude=-74.00297622685953&method=99&methodSettings=20.0,null,18.0","tls":"","persist":false,"proxy":"","authType":"","x":330,"y":160,"wires":[["8e932711aecb661c","e0cd13c63762cb24","67e5e0116617c244","d1d17c74a65db949"]]},{"id":"8e932711aecb661c","type":"debug","z":"a2dd2b1909247949","name":"","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload.data.timings.Sunset","targetType":"msg","statusVal":"payload.data.timings.Sunset","statusType":"auto","x":850,"y":80,"wires":[]},{"id":"e0cd13c63762cb24","type":"debug","z":"a2dd2b1909247949","name":"","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload.data.timings.Sunrise","targetType":"msg","statusVal":"payload.data.timings.Sunrise","statusType":"auto","x":850,"y":140,"wires":[]},{"id":"67e5e0116617c244","type":"debug","z":"a2dd2b1909247949","name":"","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload.data.date.readable","targetType":"msg","statusVal":"payload.data.date.readable","statusType":"auto","x":840,"y":200,"wires":[]},{"id":"d1d17c74a65db949","type":"debug","z":"a2dd2b1909247949","name":"","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload.data.meta.method.params.Fajr","targetType":"msg","statusVal":"payload.data.meta.method.params.Fajr","statusType":"auto","x":890,"y":260,"wires":[]}]

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.