armincms / json

A laravel nova field
MIT License
26 stars 2 forks source link

Array json data not working #11

Closed abhitheawesomecoder closed 2 years ago

abhitheawesomecoder commented 2 years ago

I have data in this format in db

[{"variation":"demo","quantity":"1","image":"abcdpic.jpg"},{"variation":"demo2","quantity":"5","image":"kkabcdpic.jpg"}]

trying to render it like

Row1        variation     demo
            quantity      1
            image         abcdpic.jpg
Row2        variation     demo2
            quantity      2
            image         kkabcdpic.jpg

but its not working

zareismail commented 2 years ago

I have data in this format in db

[{"variation":"demo","quantity":"1","image":"abcdpic.jpg"},{"variation":"demo2","quantity":"5","image":"kkabcdpic.jpg"}]

trying to render it like

Row1        variation     demo
            quantity      1
            image         abcdpic.jpg
Row2        variation     demo2
            quantity      2
            image         kkabcdpic.jpg

but its not working

You should cast it as JSON in your model