- I have a schema which contains a datetime field “from”
- There is then another JSON array field called “offers”
- “Offers” also contains a “from” field
- I am trying to use the following formula
Time.parse(offers.from).strftime("%Y-%m-%d")
But am getting an error
"error: Field 'offers' not found"
Changing offers.from
to from
references the parent from field, not the sibiling. If I change offers.from to offers.oFrom it works but this field name would not match my schema.
How should I fix this?
Desired result:
{
from: "2022-07-13T21:00:00Z",
date: "2022-07-13",
offers: [
from: "2022-05-29T12:00:00Z,
date: "2022-05-29"
]
}