AnsweredAssumed Answered

How to split record from a specific JSON Response Profile?

Question asked by gunasekaran.vanthavasi@changepoint.com on Oct 11, 2018

Hi,

I have the following JSON Response Profile: It is an example fetching only 2 records. There are 100 of records.

{
"object": {
"__type": "D.Api.Framework.Response.Model.ApiCollection, D.Api.Framework",
"items": [
"users/5939321c-d253-4eaf-9dd5-00e3b705b39a",
"users/3a6e1a84-42e0-4d3f-afbf-02a2c8acf34b"
],
"href": "users?includeinactive=false&limit=2",
"url": "https://Sandbox.d.com/_api/users?IncludeInactive=false&limit=2",
"schemaUrl": "https://Sandbox.d.com/_api/users/schema",
"isCollection": true
},
"links": {
"users/5939321c-d253-4eaf-9dd5-00e3b705b39a": {
"__type": "D.Api.Framework.Response.Model.ApiObject, D.Api.Framework",
"data": {
"CreatedOn": "/Date(1528826171580)/",
"FirstName": "FirstName1",
"LastName": "LastName1",
"FullName": "FirstName1Lastname1",
"Email": "LF1@source.com",
"TimesheetsRequired": true,
"9838d61a-0a5d-4edc-ab7a-433f3e961ccc": "992001",
"HasEditedProfile": false,
"HasAcceptedCLA": false,
"IsActive": true,
"TimeZone": "America/New_York",
"CultureInfo": "en-US",
"UiCultureInfo": "en-US"
},
"linked": {
"ResourceManagerID": "users/85c3c54b-5c88-4a43-a8df-2db3f92194bb",
"RoleID": "roles/3a3b7653-19c5-4e85-9607-871bd8572d63",
"58d4069b-5634-4c3d-a9ee-d80e688dc9b9": "fielddefinitions/58d4069b-5634-4c3d-a9ee-d80e688dc9b9/options/imag6adoab2aa4qameaggaduabxqa4qa",
"3606b466-2787-45b4-aba8-32ccee5bd3c6": "fielddefinitions/3606b466-2787-45b4-aba8-32ccee5bd3c6/options/jiagcadoabsqa2iaoiag6aa="
},
"href": "users/5939321c-d253-4eaf-9dd5-00e3b705b39a",
"url": "https://Sandbox.d.com/_api/users/5939321c-d253-4eaf-9dd5-00e3b705b39a",
"schemaUrl": "https://Sandbox.d.com/_api/users/schema",
"isCollection": false
},
"users/85c3c54b-5c88-4a43-a8df-2db3f92194bb": {
"__type": "D.Api.Framework.Response.Model.ApiObject, D.Api.Framework",
"data": {
"CreatedOn": "/Date(1528826173033)/",
"FirstName": "FirstName2",
"LastName": "LastName2",
"FullName": "FirstNam2LastName2",
"Organization": "Source.",
"Email": "LF2@source.com",
"Title": "Program Manager",
"Cell": "+9911000000",
"Country": "bd",
"TimesheetsRequired": false,
"9838d61a-0a5d-4edc-ab7a-433f3e961ccc": "992032",
"HasEditedProfile": true,
"HasAcceptedCLA": true,
"IsActive": true,
"TimeZone": "America/New_York",
"CultureInfo": "en-US",
"UiCultureInfo": "en-US"
},
"linked": {
"RoleID": "roles/9922ab00-3b82-4c4b-8771-69e6dbc6fa81",
"58d4069b-5634-4c3d-a9ee-d80e688dc9b9": "fielddefinitions/58d4069b-5634-4c3d-a9ee-d80e688dc9b9/options/imag6adoab2aa4qameaggaduabxqa4qa",
"3606b466-2787-45b4-aba8-32ccee5bd3c6": "fielddefinitions/3606b466-2787-45b4-aba8-32ccee5bd3c6/options/kiagkadmabuqauyan4ahkadsabrqazia"
},
"href": "users/85c3c54b-5c88-4a43-a8df-2db3f92194bb",
"url": "https://sandbox.d.com/_api/users/85c3c54b-5c88-4a43-a8df-2db3f92194bb",
"schemaUrl": "https://sandbox.d.com/_api/users/schema",
"isCollection": false
},
"roles/9922ab00-3b82-4c4b-8771-69e6dbc6fa81": {
"__type": "D.Api.Framework.Response.Model.ApiObject, D.Api.Framework",
"data": {
"Name": "Resource Manager External",
"Description": "Used for external resource management and does not allow access to capacity planning views."
},
"linked": {},
"href": "roles/9922ab00-3b82-4c4b-8771-69e6dbc6fa81",
"url": "https://sandbox.d.com/_api/roles/9922ab00-3b82-4c4b-8771-69e6dbc6fa81",
"schemaUrl": "https://sandbox.d.com/_api/roles/schema",
"isCollection": false
},
"fielddefinitions/58d4069b-5634-4c3d-a9ee-d80e688dc9b9/options/imag6adoab2aa4qameaggaduabxqa4qa": {
"__type": "D.Api.Framework.Response.Model.ApiObject, D.Api.Framework",
"data": {
"Name": "Contractor"
},
"linked": {},
"href": "fielddefinitions/58d4069b-5634-4c3d-a9ee-d80e688dc9b9/options/imag6adoab2aa4qameaggaduabxqa4qa",
"url": "https://sandbox.d.com/_api/fielddefinitions/58d4069b-5634-4c3d-a9ee-d80e688dc9b9/options/IMAG6ADOAB2AA4QAMEAGGADUABXQA4QA",
"schemaUrl": "https://sandbox.d.com/_api/fielddefinitions/58d4069b-5634-4c3d-a9ee-d80e688dc9b9/options/schema",
"isCollection": false
},
"fielddefinitions/3606b466-2787-45b4-aba8-32ccee5bd3c6/options/kiagkadmabuqauyan4ahkadsabrqazia": {
"__type": "D.Api.Framework.Response.Model.ApiObject, D.Api.Framework",
"data": {
"Name": "Source"
},
"linked": {},
"href": "fielddefinitions/3606b466-2787-45b4-aba8-32ccee5bd3c6/options/kiagkadmabuqauyan4ahkadsabrqazia",
"url": "https://sandbox.d.com/_api/fielddefinitions/3606b466-2787-45b4-aba8-32ccee5bd3c6/options/KIAGKADMABUQAUYAN4AHKADSABRQAZIA",
"schemaUrl": "https://sandbox.d.com/_api/fielddefinitions/3606b466-2787-45b4-aba8-32ccee5bd3c6/options/schema",
"isCollection": false
},
"roles/3a3b7653-19c5-4e85-9607-871bd8572d63": {
"__type": "D.Api.Framework.Response.Model.ApiObject, D.Api.Framework",
"data": {
"Name": "External User"
},
"linked": {},
"href": "roles/3a3b7653-19c5-4e85-9607-871bd8572d63",
"url": "https://sandbox.d.com/_api/roles/3a3b7653-19c5-4e85-9607-871bd8572d63",
"schemaUrl": "https://sandbox.D.com/_api/roles/schema",
"isCollection": false
},
"fielddefinitions/3606b466-2787-45b4-aba8-32ccee5bd3c6/options/jiagcadoabsqa2iaoiag6aa=": {
"__type": "D.Api.Framework.Response.Model.ApiObject, D.Api.Framework",
"data": {
"Name": "Name3"
},
"linked": {},
"href": "fielddefinitions/3606b466-2787-45b4-aba8-32ccee5bd3c6/options/jiagcadoabsqa2iaoiag6aa=",
"url": "https://sandbox.d.com/_api/fielddefinitions/3606b466-2787-45b4-aba8-32ccee5bd3c6/options/JIAGCADOABSQA2IAOIAG6AA=",
"schemaUrl": "https://sandbox.D.com/_api/fielddefinitions/3606b466-2787-45b4-aba8-32ccee5bd3c6/options/schema",
"isCollection": false
},
"users/3a6e1a84-42e0-4d3f-afbf-02a2c8acf34b": {
"__type": "D.Api.Framework.Response.Model.ApiObject, D.Api.Framework",
"data": {
"CreatedOn": "/Date(1529001959073)/",
"FirstName": "FirstName3",
"LastName": "LastName3",
"FullName": "FirstName3LastName3",
"Email": "LF3@source.com",
"TimesheetsRequired": true,
"9838d61a-0a5d-4edc-ab7a-433f3e961ccc": "851747",
"HasEditedProfile": true,
"HasAcceptedCLA": true,
"IsActive": true,
"TimeZone": "America/New_York",
"CultureInfo": "en-US",
"UiCultureInfo": "en-US"
},
"linked": {
"DefaultResourceType": "resourcetypes/104485f4-57ea-4699-b294-832a3246e947",
"DepartmentID": "departments/a148ab9c-9081-4272-9049-17c77a3270aa",
"ResourceManagerID": "users/b654ad8f-cb2c-4505-ae39-fab06a5c0730",
"RoleID": "roles/0e2b8f15-a315-4fd1-b22a-40a7e2bd3b2d",
"58d4069b-5634-4c3d-a9ee-d80e688dc9b9": "fielddefinitions/58d4069b-5634-4c3d-a9ee-d80e688dc9b9/options/jeag4aduabsqa4qanyagcadmaa======",
"3606b466-2787-45b4-aba8-32ccee5bd3c6": "fielddefinitions/3606b466-2787-45b4-aba8-32ccee5bd3c6/options/kmagkadoabzqa2iaoqagkaddabuaa==="
},
"href": "users/3a6e1a84-42e0-4d3f-afbf-02a2c8acf34b",
"url": "https://Sandbox.D.com/_api/users/3a6e1a84-42e0-4d3f-afbf-02a2c8acf34b",
"schemaUrl": "https://Sandbox.D.com/_api/users/schema",
"isCollection": false
},
"resourcetypes/104485f4-57ea-4699-b294-832a3246e947": {
"__type": "D.Api.Framework.Response.Model.ApiObject, D.Api.Framework",
"data": {
"Description": "Source internal.",
"Name": "SW Developer",
"Active": true
},
"linked": {},
"href": "resourcetypes/104485f4-57ea-4699-b294-832a3246e947",
"url": "https://Sandbox.D.com/_api/resourcetypes/104485f4-57ea-4699-b294-832a3246e947",
"schemaUrl": "https://Sandbox.D.com/_api/resourcetypes/schema",
"isCollection": false
},
"users/b654ad8f-cb2c-4505-ae39-fab06a5c0730": {
"__type": "D.Api.Framework.Response.Model.ApiObject, D.Api.Framework",
"data": {
"CreatedOn": "/Date(1528812272900)/",
"FirstName": "FirstName4",
"LastName": "LastName4",
"FullName": "FirstName4LastName4",
"Email": "LF4@source.com",
"TimesheetsRequired": false,
"9838d61a-0a5d-4edc-ab7a-433f3e961ccc": "210226",
"HasEditedProfile": true,
"HasAcceptedCLA": true,
"IsActive": true,
"TimeZone": "America/New_York",
"CultureInfo": "en-US",
"UiCultureInfo": "en-US"
},
"linked": {
"DepartmentID": "departments/a148ab9c-9081-4272-9049-17c77a3270aa",
"RoleID": "roles/ca5b8206-a80b-4f9a-b929-54e712d5bf6a",
"58d4069b-5634-4c3d-a9ee-d80e688dc9b9": "fielddefinitions/58d4069b-5634-4c3d-a9ee-d80e688dc9b9/options/jeag4aduabsqa4qanyagcadmaa======",
"3606b466-2787-45b4-aba8-32ccee5bd3c6": "fielddefinitions/3606b466-2787-45b4-aba8-32ccee5bd3c6/options/kmagkadoabzqa2iaoqagkaddabuaa==="
},
"href": "users/b654ad8f-cb2c-4505-ae39-fab06a5c0730",
"url": "https://Sandbox.D.com/_api/users/b654ad8f-cb2c-4505-ae39-fab06a5c0730",
"schemaUrl": "https://Sandbox.D.com/_api/users/schema",
"isCollection": false
},
"roles/ca5b8206-a80b-4f9a-b929-54e712d5bf6a": {
"__type": "D.Api.Framework.Response.Model.ApiObject, D.Api.Framework",
"data": {
"Name": "Executive",
"Description": ""
},
"linked": {},
"href": "roles/ca5b8206-a80b-4f9a-b929-54e712d5bf6a",
"url": "https://Sandbox.D.com/_api/roles/ca5b8206-a80b-4f9a-b929-54e712d5bf6a",
"schemaUrl": "https://Sandbox.D.com/_api/roles/schema",
"isCollection": false
},
"fielddefinitions/58d4069b-5634-4c3d-a9ee-d80e688dc9b9/options/jeag4aduabsqa4qanyagcadmaa======": {
"__type": "D.Api.Framework.Response.Model.ApiObject, D.Api.Framework",
"data": {
"Name": "Internal"
},
"linked": {},
"href": "fielddefinitions/58d4069b-5634-4c3d-a9ee-d80e688dc9b9/options/jeag4aduabsqa4qanyagcadmaa======",
"url": "https://Sandbox.D.com/_api/fielddefinitions/58d4069b-5634-4c3d-a9ee-d80e688dc9b9/options/JEAG4ADUABSQA4QANYAGCADMAA======",
"schemaUrl": "https://Sandbox.D.com/_api/fielddefinitions/58d4069b-5634-4c3d-a9ee-d80e688dc9b9/options/schema",
"isCollection": false
},
"fielddefinitions/3606b466-2787-45b4-aba8-32ccee5bd3c6/options/kmagkadoabzqa2iaoqagkaddabuaa===": {
"__type": "D.Api.Framework.Response.Model.ApiObject, D.Api.Framework",
"data": {
"Name": "Source"
},
"linked": {},
"href": "fielddefinitions/3606b466-2787-45b4-aba8-32ccee5bd3c6/options/kmagkadoabzqa2iaoqagkaddabuaa===",
"url": "https://Sandbox.D.com/_api/fielddefinitions/3606b466-2787-45b4-aba8-32ccee5bd3c6/options/KMAGKADOABZQA2IAOQAGKADDABUAA===",
"schemaUrl": "https://Sandbox.D.com/_api/fielddefinitions/3606b466-2787-45b4-aba8-32ccee5bd3c6/options/schema",
"isCollection": false
},
"roles/0e2b8f15-a315-4fd1-b22a-40a7e2bd3b2d": {
"__type": "D.Api.Framework.Response.Model.ApiObject, D.Api.Framework",
"data": {
"Name": "Team Member",
"Description": ""
},
"linked": {},
"href": "roles/0e2b8f15-a315-4fd1-b22a-40a7e2bd3b2d",
"url": "https://Sandbox.D.com/_api/roles/0e2b8f15-a315-4fd1-b22a-40a7e2bd3b2d",
"schemaUrl": "https://sandbox.D.com/_api/roles/schema",
"isCollection": false
}
}
}

 

I like to spilt the records at the Links level, so that I can get the individual records of user details, to cache and process further.

 

How do I get the spilt working? or how do I modify this json into Array (Repeating) for proper split?

 

Thank you and Appreciate your help.

Guna.

Attachments

Outcomes