Access same variable with different value from multiple json files

I have multiple json files look like this:
temp/file-a.json:
{
     “x”: 5”,
      “y”: “name1”,
}

tmp/file-b.jsob:
{
     “x”: “10”,
      “y”: “name2”,
}

tmp/file-c.json:
{
    “x”: “7”,
    “y”: “name3”,
}

....... and more

All json files are on the same server where I place my playbook. My goal is to access variable x from each json file. If x<6, I will copy json file to another remote hostA. I can use the following playbook to achieve my goal for single json file: