MIT APP INVENTOR 2字典麻烦

时间:2018-04-25 17:12:17

标签: app-inventor

MIT APP INVENTOR 2我有这个问题:我有一个包含许多子类的字典。但我不知道如何访问字典中的特定数据。例如,a有下一个列表:

{
  "keystatus" : "valid",
  "status" : 0,
  "result" : [
    {
      "stores" : {
        "0" : {
          "category" : "",
          "min_price" : "64.90",
          "manufacturer" : "adidas",
          "url" : "https:\/\/www.rakuten.de\/%20produkt%20\/adidas-leonero-herrenschuhe-sneaker-2040331525.html?portaldv=6",
          "title" : "adidas Leonero Herrenschuhe Sneaker",
          "advertiser" : "Rakuten Deutschland GmbH",
          "currency" : "€",
          "max_price" : ""
        }
      },
      "details" : {
        "barcode_formats" : "EAN 4058025901204",
        "color" : "",
        "publisher" : "",
        "weight" : "",
        "actor" : "",
        "brand" : "adidas",
        "product_name" : "adidas Leonero Herrenschuhe Sneaker",
        "category" : "",
        "prod_details" : "",
        "manufacturer" : "adidas",
        "length" : "",
        "label" : "",
        "clothing_size" : "",
        "artist" : "",
        "height" : "",
        "model" : "",
        "width" : "",
        "director" : "",
        "genre" : "",
        "manufacturer_part_number" : "Adidas Leonero",
        "long_description" : "Nach 70 Jahren als einer der weltbesten Hersteller von FuBballschuhen hat adidas jede Menge Erfahrung gesammelt, wenn es um cleanen Sportstyle geht. Wir haben uns von einigen der legendärsten Designs aus unseren Archiven inspirieren lassen und m",
        "features" : "",
        "author" : ""
      },
      "reviews" : {

      },
      "type" : "EAN",
      "images" : {
        "0" : "https:\/\/images.barcodelookup.com\/9152\/91526482-1.jpg"
      },
      "barcode" : "4058025901204"
    }
  ]
}

我想访问字典["result"][0]["stores"]["0"]["title"]的这一部分。有什么想法吗?

欢迎所有想法。感谢

1 个答案:

答案 0 :(得分:0)

您必须学习如何使用列表和列表列表......

见这些例子:
Saj的How to work with Lists How to work with Lists and Lists of lists(pdf)appinventor.org JSON和列表列表:example1example2