+ Reply to Thread
Results 1 to 2 of 2

Is JSON correct? (merge cells on header)

  1. #1
    Registered User
    Join Date
    01-15-2022
    Location
    Hong Kong
    MS-Off Ver
    365
    Posts
    8

    Is JSON correct? (merge cells on header)

    Hello

    I have an excel in the attachment

    By seeing the spreadsheet. I created the json file (as restaurant_few.txt) on my own from scratch

    But I have some problem with my "json file"

    I have trouble with the header on top. For example:
    For BBQ Pork Bun and it is in a merge cell.
    Then the below two cells, one is sales volume, and the other is income.

    How can I manipulate it. Please advice if there is any change for the "json file"

    What's more Is my "json file" correct. if you see any problem or have any suggestion, please tell me

    Thanks

    The json code is at the bottom and also the attach text file

    {
    {"NO":1,
    "SHOP": "Fanling",
    "BBQ Pork Bun":[{
    "Sales Volume": 20,
    "Income": 100
    }],
    "Lotus Paste Bun":[{
    "Sales Volume": 21,
    "Income": 84
    }],
    "Sticky Rice":[{
    "Sales Volume": 9,
    "Income": 90
    }]
    },
    {"NO":2,
    "SHOP": "Sheung shui",
    "BBQ Pork Bun":[{
    "Sales Volume": 25,
    "Income": 125
    }],
    "Lotus Paste Bun":[{
    "Sales Volume": 15,
    "Income": 60
    }],
    "Sticky Rice":[{
    "Sales Volume": 9,
    "Income": 80
    }],
    {"NO":3,
    "SHOP": "Tuen mun",
    "BBQ Pork Bun":[{
    "Sales Volume": 27,
    "Income": 135
    }],
    "Lotus Paste Bun":[{
    "Sales Volume": 19,
    "Income": 76
    }],
    "Sticky Rice":[{
    "Sales Volume": 9,
    "Income": 90
    }]
    },
    {"NO":4,
    "SHOP": "Tsuen wan",
    "BBQ Pork Bun":[{
    "Sales Volume": 21,
    "Income": 105
    }],
    "Lotus Paste Bun":[{
    "Sales Volume": 17,
    "Income": 68
    }],
    "Sticky Rice":[{
    "Sales Volume": 8,
    "Income": 80
    }]
    },
    {"NO":5,
    "SHOP": "Kwun tong",
    "BBQ Pork Bun":[{
    "Sales Volume": 17,
    "Income": 85
    }],
    "Lotus Paste Bun":[{
    "Sales Volume": 20,
    "Income": 80
    }]
    "Sticky Rice":[{
    "Sales Volume": 10,
    "Income": 100
    }]
    },
    {NO:"n/a",
    "SHOP":"TOTAL",
    "BBQ Pork Bun":[{
    "Sales Volume": 100,
    "Income": 500
    }],
    "Lotus Paste Bun":[{
    "Sales Volume": 92,
    "Income": 368
    }],
    "Sticky Rice":[{
    "Sales Volume": 44,
    "Income": 440
    }]
    }
    }

    }
    Attached Files Attached Files
    Last edited by nestaho; 01-23-2022 at 10:15 PM.

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,481

    Re: Is JSON correct? (merge cells on header)

    Hard to tell without seeing code.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How to use options with VBA-JSON
    By truk2 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-13-2021, 09:46 PM
  2. Parsing JSON
    By Lana74 in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 08-28-2020, 09:01 PM
  3. JSON object in CSV
    By markhad in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-28-2020, 03:26 AM
  4. Edit JSON parser code to add function to write JSON file
    By mc84excel in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 02-16-2020, 09:28 PM
  5. [SOLVED] Trouble with VBA-JSON
    By stusic in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-07-2017, 06:48 AM
  6. Excel VBA-JSON Example
    By manofcheese in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-28-2016, 11:52 AM
  7. [SOLVED] Pulling json or csv data from a url
    By Versial in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 12-10-2012, 04:43 AM

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1