Convert object type data to array in Elastic search watcher

Hi,

I am trying to run a Elasticsearch watcher, but I am stuck in the chain input,

I have a http fetch -> transfrom the http response data -> used by the index search

the http response data is simply a json like this ["1","9","7","1","7"]

when I pass it to index search query it automatically convert to something like this

"body": {
                "query": {
                  "bool": {
                    "must": {
                      "terms": {
                        "labels.project_id": [
                          "{0=1, 1=9, 2=7, 3=1, 4=7}"
                        ]
                      }
                    }
                  }
                }
              }
            }

I expect it simply be a normal array like ["1","9","7","1","7"], is there any way to convert it back to normal array?

below is my full query for the input part

"input": {
    "chain":{
      "inputs":[
        {
          "first":{
            "http":{
              "request" : {
              "host" : "test.com",
       
              "path" : "/prod/tasks" ,
               "scheme": "https",
        "port": 443
            }
            }
          }
        },{
          "second":{
            "transform" : {
            "script" : "return ['ids': ctx.payload.first.projectId]"
          }
          }
        },{
          "third":{
            "search":{
              "request":{
                "indices":["lu-traces-apm"],
                "body":{
                  "query":{
                    
                   "bool":{
                     
                      "must":{
                           "terms":{
                           "labels.project_id": ["{{ctx.payload.second.ids}}"]
                    }
                      }
                    }
                   
                }
                }
              }
            }
          }