This doesn’t seem to work for me because the embedded resources are not saved to the store. So when you try to access the embedded object, an exception is thrown that the object does not exist in the store. I’m assuming this is because extractArray does not expect an arbitrary property to be set on the returned array (and it pukes if you return anything besides an array).
Is there an updated way to accomplish this? Are you supposed to tell it to insert those objects into the store explicitly?
And this one which actually works, but I’m unsure if it’s safe to be inserting into the store here, and not sure if it takes advantage of any of those other (potentially necessary) transformations).