function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Charles Kelly 17Charles Kelly 17 

Importing a JSON file with field mapping

Hello,

I am trying to import a json file into my salesforce org using VS Code. The source file has different field names than my org so I need to do some field mapping. Here is the file I'm using:
{
    "orgPreferences": {
      "objectSettings": [
        {
          "object": "Player__c",
          "type": "object",
          "files": ["PlayerList2.json"],
          "resolveRefs": true,
          "saveRefs": true,
          "fieldMappings": [
            {
              "source": "amateur",
              "target": "Amateur__c"
            },
            {
              "source": "country",
              "target": "Country__c"
            },
            {
              "source": "country_code",
              "target": "country_code__c"
            },
            {
              "source": "dg_id",
              "target": "dg_id__c"
            },
            {
              "source": "player_name",
              "target": "Name"
            }
          ]
        }
      ]
    }
  }

However, I keep getting the error: 

Error (1): Validation errors:
#/type: must be array

I've tried adding [] around "Object" but still getting the same error.

Please help!
Thanks
Charles