Quantcast
Viewing all articles
Browse latest Browse all 520

Run a command for each item in jq array

This is how my input file looks like:

[  {"ConfigType": "ABC","Prop1": 3,"Prop2": 30  },  {"ConfigType": "XYZ","Prop3": "Hello","Prop4": "World","Prop5": "Application"  }]

I need to prepare insert statement for each item.

This is how my jq command looks like which gives me each item.

cat app-cnfg.json |  jq -r ".[]"

How do I execute aws dynamodb put-item --table-name "xxx" --item <<array's element>>?


Viewing all articles
Browse latest Browse all 520

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>