Results 1 to 2 of 2

Thread: I have a json file with nested data, how do I show it all in one row?

  1. #1
    Sencha Premium User
    Join Date
    Aug 2016
    Posts
    30

    Default I have a json file with nested data, how do I show it all in one row?

    So I have some nested JSON data that I want to show in a Datagird. The data looks like this:

    Code:
     {
                "Id": 17436936,
                "Name": "BS1564",
                "Barcode": "BS1564",
                "Sequence": 1564,
                "Created": "2016-09-29T20:22:44Z",
                "Modified": null,
                "Active": true,
                "LikedBy": 0,
                "FollowedBy": 0,
                "REV_IMPL_LOT_SAMPLE_BEER_SAMPLE_LOT": [
                    {
                        "Id": 17457460,
                        "Name": "BS1564-2",
                        "Barcode": "BS1564-2",
                        "Sequence": 4343,
                        "Created": "2016-09-29T20:22:57Z",
                        "Modified": null,
                        "Active": true,
                        "LikedBy": 0,
                        "FollowedBy": 0,
                        "CI_LOT_NUM": 2,
                        "CI_INTENDED_USAGE": "Turbidity Testing"
                    },
                    {
                        "Id": 17447594,
                        "Name": "BS1564-1",
                        "Barcode": "BS1564-1",
                        "Sequence": 1937,
                        "Created": "2016-09-29T20:22:50Z",
                        "Modified": null,
                        "Active": true,
                        "LikedBy": 0,
                        "FollowedBy": 0,
                        "CI_LOT_NUM": 1,
                        "CI_INTENDED_USAGE": "ABV Testing"
                    }
                ]
            }
    and I want the row to include the nested data in one column but just showing the Barcodes.

    Any thoughts on how to approach this?

    Thanks so much in advance,

    Philip

  2. #2
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985
    Answers
    506

    Default

    So you'd like the 'barcode' field data from each nested data item to be listed in the column? What does your grid code look like?

Similar Threads

  1. How to show data of a flat file in a nested list?
    By bushveld in forum Sencha Touch 2.x: Q&A
    Replies: 3
    Last Post: 28 Jul 2013, 10:20 PM
  2. show a nested Json on EXT.dataview.List
    By isaid in forum Sencha Touch 2.x: Q&A
    Replies: 2
    Last Post: 11 Jul 2013, 7:47 AM
  3. Cannot read second value in nested json file
    By kuarama1990 in forum Sencha Touch 2.x: Q&A
    Replies: 2
    Last Post: 4 Oct 2012, 7:35 AM
  4. Replies: 6
    Last Post: 11 Aug 2011, 2:56 AM
  5. Use data from associated model; parent reads from nested json file
    By RoelKramer in forum Sencha Touch 1.x: Discussion
    Replies: 0
    Last Post: 19 Jul 2011, 3:58 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •