https://avo.cool logo
So, I have a JSON field that is a nested data s...
# avo-3
a
So, I have a JSON field that is a nested data structure
Copy code
{
  "a": {
    "foo": 1,
    "bar": 2
  },
  "b": {
    "baz": 3,
    "blorb": 4
  }
}
m
Thread automatically created by jcn in #1138182212655788054
a
This currently doesn't render properly in a key_value field because the "value" ends up as
[object Object]
any ideas on what might need to change to get this to actually display this properly, even just to display the contents as JSON?
l
Hi @adorable-france-99527 There isn't any Avo DSL to achieve any of your questions, both would require some changes on the stimulus controller that is responsible for the key value field https://github.com/avo-hq/avo/blob/da22b0973373d4fb8c5d699bf5b436bfe9098dd1/app/javascript/js/controllers/fields/key_value_controller.js --- If you want to give it a try I would be happy to help you setting up avo's repository locally and guide you through the code base
a
@loud-jewelry-99127 thanks. For now I'm displaying it at as pretty-displayed JSON blob in the "display" contexts and then key_value in the edit contexts, which is sufficient, but if I have a bit of time I'd love to look into that as an option.
l
For this kind of nested JSON I normally use and suggest the code field