I am writing a function node in node-red that is taking in a JSON object with arbitrary key val pairs:
{ 30000c690b61: "m8Jp_M7Lc0",
30000c290bdc65: "S3qg3Rkl8Y",
30000c290bdf1c: "KsLpfVrR4W",
30000c290be5d0: "oXasuCWV_q",
30000c29e618: "6Q67v-gJkS" … }
I would like to access the first key pair element in this object, store it, and then delete it. I have tried multiple things, but since it is node-red, it seems to behave different
var firstKey = Object.keys(myObject)[0];
delete myObject[firstKey ];