PHP-Vars-To-Js-Transformer - odd behavior
I'm using PHP-Vars-To-Js-Transformer to pass the results of four queries to JS so I can access that information and use it for validation. It works perfectly 3 out of 4 times. In three cases the info appears in JS as an array of objects which is exactly what I want. However in the 4th case it appears in JS as a Object containing objects. This means I can use the handy array methods to filter and retrieve the rows of data I need for the 4th table passed into JS. I can work around it but I'd rather understand what is causing the difference. The tables are basically the same there is nothing special about the fourth table the code in eloquent is identical to at least one of the other queries except for the specific field names in the select statement. I can't see any differences in the laravel collection returned by any of the queries. Any ideas why the difference at the JS side ??
Please or to participate in this conversation.