AutoTools JSON Trouble

Discussion in 'AutoApps' started by libnaniam, Apr 29, 2018.

  1. libnaniam

    libnaniam New Member

    Joined:
    Apr 28, 2018
    Messages:
    2
    Likes Received:
    0
    Hello, I am having trouble dumping a root json object into the value of another json file. Essentially, I am trying to turn a .json that looks something like this {key1: {}} into this {key1: root2}

    I have attached json file that I read from file (renamed to .txt so that I could attach it to this post).

    This is my setup:

    1. JSON Read - Attached .json file (aka "root1")
    Input Format: Json
    Simple Mode: true
    Json: path to file
    Json Root Variable: testroot
    Separator: ,

    2. JSON Read - URL (aka "root2")
    Input Format: Json
    Simple Mode: true
    Json: http://data.nba.net/prod/v2/20180428/scoreboard.json
    Json Root Variable: todayjson
    Separator: ,

    3. JSON Write
    Separator: ,
    Update Fields: today
    Update Values: %todayjson
    Arrays Separator: |

    I am getting an error that says "update paths and values must have the same number of values." I think the problem is that AutoTools treats root2 as multiple key/value pairs rather than one json object. Has anyone encountered this before or can think of a solution?
     

    Attached Files:

  2. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    If you want to use existing JSON use in the input field in the JSON Write action :) That should work!
     
    Jettavod likes this.
: autotools, json, root

Share This Page