When inserting a new record in a table, is it better to use Object or Key Value Pairs?
Hi @tomm,
There isn't necessarily a "better" one to use, but if you're doing bulk insert or update, you have to use an array of objects. If it's a single insert/update, then you have the option of using either one.
They key value pair is really explicit because you can specify the key (column name) and value explicitly. This can be a bit more work because you need to populate each value manually, but it can be handy if you're pulling data from multiple blocks.
Objects are just an array of objects where the keys map to your column names, very handy for bulk changes, but you might need a JS block to build out the array if you're pulling data from multiple blocks.