I'm not sure what you're looking for, but a fun problem I ran into one day (one that I solved, but ultimately we went a different route) is to find an existing key in a js object, and insert a new key/value js object after that key.
For example:
const userdata = [ { name: "Emma", age: 21, hobby: { reading: true, gaming: false, sport: "tennis" }, class: ["Java", "Go", "Nginx"] }, { name: "John", age: 22, hobby: { reading: true, gaming: false, sport: "football" }, class: ["JavaScript", "HTML", "CSS"] }, ]
const newdata = { knitting: true }
And then, the task is to make a utility function to find "name: John", then "hobby" and append newdata in the "hobby"object. Try to apply immutability. Try to do without the overhead of JSON string conversion.