Display an array as an editable table

  • 1
  • Question
  • Updated 4 years ago
I have a text field that stores stores an array - formatted as either and HTTP POST or JSON array. Can I have this array displayed as a editable table?


{"items": [
    {"Name":"Shirt", "Quantity":"2", "Price":"19.95"},
    {"Name":"Jeans", "Quantity":"3", "Price":"89.99"},
Photo of Griffin Brown

Griffin Brown

  • 2,818 Points 2k badge 2x thumb
  • curious

Posted 4 years ago

  • 1
Photo of Irvin Waldman

Irvin Waldman, Champion

  • 9,026 Points 5k badge 2x thumb
Interesting question, Griffin.

Can you create a custom object that is just used for CRUD operations on the JSON Data?  You'll need to populate the model i.e deserialize from JSON to custom object and then determine best time to serialize back to JSON, store in the Text field and clean up the records in the custom object. Seems like a lot of ceremony, though.

Have you considered a custom renderer?  
Photo of Matt Sones

Matt Sones, Champion

  • 32,106 Points 20k badge 2x thumb
You could do it with a custom table view.