Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- jq --slurpfile users 1st.json '$users[0].users[0] as $users
- | .info.users |= map(if (. | in($users)) then . = $users[.] else . end)' 2nd.json
- {
- "info": {
- "users": [
- "user1",
- "user2",
- "key3",
- "key4"
- ]
- }
- }
Add Comment
Please, Sign In to add comment