Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Foreach json with indexes and values

Foreach json with indexes and values

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 591 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    iacoposk8
    wrote on last edited by
    #1

    Hello everyone. there is a way to put in a foreach, a json object and retrieve various indices and their values?
    example, if I have a json file:
    [code]
    {
    "a":"1",
    "b":"5",
    "c":"9",
    "d":"2"
    }
    [/code]
    I would like a foreach, show me
    a = 1
    b = 5
    c = 9
    d = 2

    ps: Googling I saw how to do a foreach and show only the values, without indexes

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved