Quick function / Bson Multiadd KVP in BSON

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Done
    • Priority: Major - P3
    • None
    • Affects Version/s: 3.0.1
    • Component/s: API
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Hey there!
      there is a JSON file in a BSON Object looking like the following.
      I'm going to add in the marked areas the same attribut. I'm having problems in my loops to get the number of elements from a array. so I can't navigate in it. Only possible way I see is to iterate through every single element of the array and check if the returned value is 0x00 or valid.

      Is there a faster way to do this?

      {
          "_id" : ObjectId("5705918cb6a7d12aea0525f1"),
      //add: "status" : 0
          "targets" : {
              "fast" : [ 
                  {
                      "size" : "poster",
                      "format" : "jpg",
                      "count" : 5
      //add: "status" : 0
                  }, 
                  {
                      "size" : "thumb",
                      "format" : "jpg"
      //add: "status" : 0
                  }
              ],
              "slow" : [ 
                  {
                      "size" : "sd",
                      "format" : "mp4"
      //add: "status" : 0
                  }, 
                  {
                      "size" : "sd",
                      "format" : "webm"
      //add: "status" : 0
                  }
              ]
      }}  
      

      thx!
      Armin

            Assignee:
            Unassigned
            Reporter:
            Armin Ball [X]
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: