im trying to iterate in a foreach loop a json object, but with no success, it keeps giving me error regarding html entities.
The data im trying to output in my foreach is above:
Data: variable that is stored the data above is '$product->tags['data']'
{"tags":[{"type":"circle","points":[[1.0449999570846558,0.5450000166893005],[0.9850000143051147,0.4399999976158142]],"popup":{"title":"my title","description":"my description"}},{"type":"rectangle","points":[[0.03500000014901161,0.125],[0.3400000035762787,0.6000000238418579]],"popup":{"title":"roupa","description":"guardar roupa"}}]}
My code:
@foreach($product->tags['data']->tags as $tag){
{{$tag->type}}
}
My error:
Invalid argument supplied for foreach()