Do you understand the change you have made to $VAR1? You have replaced
the string 'user.firstName' with a reference to an array containing
only one element (the original string). The error message you reported
in your chatterbox message is exactlly what you should expect if you
made only this change to my script. Note that my
for $var loop no longer
makes much sense because all the values no longer have the same structure.
Use
hippo's method to dereference just the two required values.
Now show us your best effort to put these two values into your spread sheet.