How to pass tags in a new line JSON Format
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2025 12:39 PM
Hello, I need to Pass tags <Remove>R</Remove> in a new line like below, I tried using \n but i am not able to add in a new line how do i pass ?
"Content": [
{
"ID": "123",
"Name": "Name1"
<Remove>R</Remove>
}
{
"ID": "1234",
"Name": "Name2"
}
]
Here is the sample code I tried
"Name": "Name1"
"Name": "Name2" +'\n'+parsedData.tag
- Labels:
-
API
-
Graphql to json
-
REST
-
REST API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2025 12:41 PM
@Ankur Bawiskar Any thoughts?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2025 07:17 PM
what's your requirement here?
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2025 08:14 PM
@Ankur Bawiskar Thanks for responding!
I need to send tag <Remove>R</Remove> in a JSON format in POST operation like below, I am able to send in the same line using the sample code above like "Name": "Name1 <Remove>R</Remove>" but not in the next line, how do i pass it in next line?
"Content": [
{
"ID": "123",
"Name": "Name1"
<Remove>R</Remove>
}
{
"ID": "1234",
"Name": "Name2"
}
]
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2025 08:20 PM
I don't think you can add new line there
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
