JSON to Individual text fields possible?

Options

Hi,

I am wondering if this is possible to achieve? From my head maybe with a function?

I have a JSON field that when I receive the data, I would like to separate into different text fields.

Example:

JSON input

[{open: {day: 0,time: 0700},close: {day: 0,time: 1500}},{open: {day: 1,time: 0600},close: {day: 1,time: 1500}},{open: {day: 2,time: 0600},close: {day: 2,time: 1500}},{open: {day: 3,time: 0600},close: {day: 3,time: 1500}},{open: {day: 4,time: 0600},close: {day: 4,time: 1500}},{open: {day: 5,time: 0600},close: {day: 5,time: 1500}},{open: {day: 6,time: 0630},close: {day: 6,time: 1500}}]

Then the individual texts fields in DB would be “day 0 Open” “day 0 Closed” and so on. Is this possible? Thank you very much.

Tagged:

Answers