I’m developing a Laravel-based web application that has the
Post model -
id - bigInt slug - varchar data - json created_at - timestamp updated_at - timestamp
data column is of
json data type because I want to store multiple, dynamic records in it.
I’m curious to know how do I convert the json data before I feed it to Algolia’s APIs? I’ve tried casting the
data attribute to
array, but it doesn’t seem to work.
data attribute stores multidimensional arrays encoded as JSON; and I cannot predict the structure of the data being stored (that’s why the json data type).
Should I switch over to storing the data as json strings in
text column? Or is there any way to feed the JSON data to Algolia?
Thank you in advance for your time.