{"type":"video","version":"1.0","html":"<iframe src=\"https://www.loom.com/embed/f954c3c14f7f4293aa7b28184234f26a\" frameborder=\"0\" width=\"1280\" height=\"960\" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>","height":960,"width":1280,"provider_name":"Loom","provider_url":"https://www.loom.com","thumbnail_height":960,"thumbnail_width":1280,"thumbnail_url":"https://cdn.loom.com/sessions/thumbnails/f954c3c14f7f4293aa7b28184234f26a-full-1673288056355.jpg","duration":667.56,"title":"Data in n8n - Part 2 - ▶️ Change the Data","description":"- [ ] Change the data\n\t- [ ] In this case we wanted to flatten the data and format it for API calls\n\t\t\tBy looping over the data we can assign it just the way it needs to be \n\t\t\tAfterward we can push it back to a spreadsheet, or keep using the data\n\t- [ ] Is there other ways to do this in n8n?\n\t\t- [ ] Absolutely, but this is an illustration with a real world, common use case example \n\t- [ ] Looping with the Code node\n\t\t- [ ] Run Mode\n\t- [ ] Built in variables\n\t\t- [ ] Use the docs for reference https://docs.n8n.io/code-examples/methods-variables-reference/#current-node-input\n\t\t- [ ] We're only using $input\n\t- [ ] Data linking\n\t\t- [ ] Return $input when possible, to simplify things\n\t\t- [ ] Otherwise follow the object structure outlined in the docs https://docs.n8n.io/data/data-mapping/data-item-linking/item-linking-code-node/#paireditem-usage-example\n\t\t\t- [ ] If you exclude the pairedItem key, it may cause issues with using  $(\"\").item later in the workflow\n\t- [ ] Create a new object with new keys\n\t\t- [ ] Many ways to do this - but we'll use Object.keys in a loop\n\t\t- [ ] Basic JS Methods for strings and objects are necessary\n\t\t\t- [ ] Use reference materials that work for you; W3 (https://www.w3schools.com/jsref/jsref_obj_string.asp) is probably easier to read, whereas Mozilla docs (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) are more accurate."}