Creative Communities of the World Forums

The peer to peer support community for media production professionals.

  • for() if(){}

  • batnyam batsaikhan

    November 15, 2021 at 3:02 am

    Dear All

     

    I need your help.

    Please check below expression

    for (var k=0; k<21; k++);

    if(footage(“daily-by-location.json”).dataValue([1,k,8])==”618f344d1cb3e06d152fd4b3″){

    footage(“daily-by-location.json”).dataValue([1,k,4])}else{“No Match”}

    the json file located in harddrive.

    the result is false, but i know that “618f344d1cb3e06d152fd4b3” exist.

    the var k does not loop.

    if the var k is defined, for example “1” the expression would show the desired result.

    Is my expression correct or not?

     

     

  • Dan Ebberts

    November 15, 2021 at 1:48 pm

    I haven’t tested this, but I think you’d want to structure it more like this:

    val = "No Match";

    for (var k=0; k<21; k++){

    if(footage("daily-by-location.json").dataValue([1,k,8])=="618f344d1cb3e06d152fd4b3″){

    val = footage("daily-by-location.json").dataValue([1,k,4]);

    break;

    }

    }

    val

Viewing 1 - 2 of 2 posts

Log in to reply.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy