skip to Main Content

Json – jq merge 2 rows to 1

{ "field": "@timestamp", "value": "2024-08-20 23:00:13.426" } { "field": "@message", "value": "Started-1" } { "field": "@timestamp", "value": "2024-08-20 23:00:13.427" } { "field": "@message", "value": "Started-2" } Edited to show that the JSONs are repeating block I have JSONs above which…

VIEW QUESTION

Json – Create one big object from a list of objects using jq

Okay so I have blob of data like so ... [ { "sys_replace_on_upgrade": "false", "initial_state": "false", "sys_mod_count": "0", "sys_updated_on": "2020-09-02 13:48:39", "sys_tags": "", "state_label": "Authorize", "sys_class_name": "sttrm_state", "state_sequence": "3", "sys_id": "13fc0801c343101035ae3f52c1d3ae77", "sys_update_name": "sttrm_state_13fc0801c343101035ae3f52c1d3ae77", "sys_updated_by": "admin", "sys_created_on": "2020-09-02 13:48:39", "sys_name": "Authorize",…

VIEW QUESTION

merge 2 json arrays using ansible or jq

So I have 2 json array files one with some simple data (could be any number of servers): [ { "playbook": "simplerun.yml", "server": "abc", "status": "success" }, { "playbook": "simplerun.yml", "server": "def", "status": "success" } etc ] and a master…

VIEW QUESTION
Back To Top
Search