Is your query returning array or object? If you dump it out, you might find that it’s an array and all you need is an array access ([]) instead of an object access (->).
Is your query returning array or object? If you dump it out, you might find that it’s an array and all you need is an array access ([]) instead of an object access (->).