Guest User

Untitled

a guest
Jan 16th, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. jq --slurpfile users 1st.json '$users[0].users[0] as $users
  2. | .info.users |= map(if (. | in($users)) then . = $users[.] else . end)' 2nd.json
  3.  
  4. {
  5. "info": {
  6. "users": [
  7. "user1",
  8. "user2",
  9. "key3",
  10. "key4"
  11. ]
  12. }
  13. }
Add Comment
Please, Sign In to add comment