JSON output:
{"d":[{"id":960929,"created_at":"2019-06-19T00:27:28.107Z","belongs_to__application":{"__deferred":{"uri":"/resin/application(1415733)"},"__id":1415733},"is_created_by__user":{"__deferred":{"uri":"/resin/user(47100)"},"__id":47100},"commit":"9d6542006b3b9a3d61994e24f9d1c6dc","composition":{"version":"2.1","networks":{},"volumes":{"resin-data":{}},"services":{"ecoationROS":{"build":{"context":"./ROS/app/ecoation-oko-app"},"privileged":true,"restart":"always","network_mode":"host","volumes":["resin-data:/data"],"labels":{"io.balena.features.kernel-modules":"1","io.balena.features.firmware":"1","io.balena.features.dbus":"1","io.balena.features.supervisor-api":"1","io.balena.features.balena-api":"1","io.balena.update.strategy":"download-then-kill","io.balena.update.handover-timeout":""}}}},"status":"success","source":"local","start_timestamp":"2019-06-19T00:27:27.748Z","end_timestamp":"2019-06-19T00:31:24.815Z","update_timestamp":"2019-06-19T00:31:25.222Z","__metadata":{"uri":"/resin/release(960929)","type":""}},{"id":960899,"created_at":"2019-06-18T23:10:13.653Z","belongs_to__application":{"__deferred":{"uri":"/resin/application(1415733)"},"__id":1415733},"is_created_by__user":{"__deferred":{"uri":"/resin/user(47100)"},"__id":47100},"commit":"dec59d2b05c5db9a7d4d90bfaab27e3b","composition":{"version":"2.1","networks":{},"volumes":{"resin-data":{}},"services":{"ecoationROS":{"build":{"context":"./ROS/app/ecoation-oko-app"},"privileged":true,"restart":"always","network_mode":"host","volumes":["resin-data:/data"],"labels":{"io.balena.features.kernel-modules":"1","io.balena.features.firmware":"1","io.balena.features.dbus":"1","io.balena.features.supervisor-api":"1","io.balena.features.balena-api":"1","io.balena.update.strategy":"download-then-kill","io.balena.update.handover-timeout":""}}}},"status":"success","source":"local","start_timestamp":"2019-06-18T23:10:13.280Z","end_timestamp":"2019-06-18T23:27:07.857Z","update_timestamp":"2019-06-18T23:27:08.157Z","__metadata":{"uri":"/resin/release(960899)","type":""}},{"id":954099,"created_at":"2019-06-12T18:22:53.281Z","belongs_to__application":{"__deferred":{"uri":"/resin/application(1415733)"},"__id":1415733},"is_created_by__user":{"__deferred":{"uri":"/resin/user(49299)"},"__id":49299},"commit":"2200c40d0972f4fe25bba661e7945112","composition":{"version":"2.1","networks":{},"volumes":{"resin-data":{}},"services":{"ecoationROS":{"build":{"context":"./ROS/app/ecoation-oko-app"},"privileged":true,"restart":"always","network_mode":"host","volumes":["resin-data:/data"],"labels":{"io.balena.features.kernel-modules":"1","io.balena.features.firmware":"1","io.balena.features.dbus":"1","io.balena.features.supervisor-api":"1","io.balena.features.balena-api":"1","io.balena.update.strategy":"download-then-kill","io.balena.update.handover-timeout":""}}}}}]}
What I want:
[
{
created_at: ...
commit: ...
},
{
created_at: ...
commit: ...
},
{
created_at: ...
commit: ...
}
]
How can I approach this highly nested json? Is there anyway to easily do this in ruby? maybe a code generator or something?