Expected output data:
[
{
\"account_name\": \"Prajwal\",
\"Name\": \"Jhonson Inc.\",
\"OwnerId\": \"0052w00000BUhAGAA1\",
\"StageName\": \"Negotiation/Review\",
\"CloseDate\": \"2024-07-15\",
\"Description\": \"Renewal contract for XYZ Inc. with added services.\",
\"campaign_name\": \"Navya-Snaplogic\",
\"Campaign_Id\": \"701Ig000000xF3BIAU\",
\"AccountId\": \"0012w000027SrONAA0\"
}
]
the campaign_id and accountid should be incorporated into the first object.
Thank you for your help!
Prajwal
Hi all,
Can anyone help me to figure out how can I format the data in more structural manner?
Input Data:
[
{
\"account_name\": \"Prajwal\",
\"Name\": \"Jhonson Inc.\",
\"OwnerId\": \"0052w00000BUhAGAA1\",
\"StageName\": \"Negotiation/Review\",
\"CloseDate\": \"2024-07-15\",
\"Description\": \"Renewal contract for XYZ Inc. with added services.\",
\"campaign_name\": \"Navya-Snaplogic\"
},
{
\"Campaign_Id\": \"701Ig000000xF3BIAU\"
},
{
\"AccountId\": \"0012w000027SrONAA0\"
}
]
Expected output data:
[
{
\"account_name\": \"Prajwal\",
\"Name\": \"Jhonson Inc.\",
\"OwnerId\": \"0052w00000BUhAGAA1\",
\"StageName\": \"Negotiation/Review\",
\"CloseDate\": \"2024-07-15\",
\"Description\": \"Renewal contract for XYZ Inc. with added services.\",
\"campaign_name\": \"Navya-Snaplogic\",
\"Campaign_Id\": \"701Ig000000xF3BIAU\",
\"AccountId\": \"0012w000027SrONAA0\"
}
]
the campaign_id and accountid should be incorporated into the first object.
Thank you for your help!
Prajwal
Thanks Aleksandar_A and svatada, I'll give a try with these methods.
","body@stringLength":"466","rawBody":"Thanks
Hello Prajwal,
Is the input always going to be the same (the number of documents)? If yes, then you can use a Gate Snap to gather all of the documents into a single array and then combine all of the elements into a single object.
For more information, please refer to the attached pipeline.
Let me know if this helps you.
Regards,
Aleksandar.
","body@stripHtml({\"removeProcessingText\":true,\"removeSpoilerMarkup\":true,\"removeTocMarkup\":true,\"truncateLength\":200})@stringLength":"208","postTime":"2024-05-29T00:48:48.230-07:00","lastPublishTime":"2024-05-29T00:48:48.230-07:00","images":{"__typename":"AssociatedImageConnection","edges":[],"totalCount":0,"pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null}},"attachments":{"__typename":"AttachmentConnection","pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null},"edges":[{"__typename":"AttachmentEdge","cursor":"MjUuNHwyLjF8b3w1fF9OVl98MQ","node":{"__ref":"Attachment:{\"id\":\"attachment:message25980AttachmentNumber1\",\"url\":\"https://community.snaplogic.com/t5/s/iaudz84835/attachments/iaudz84835/data_integration/215/1/--sl-comm-structure-input_2024_05_29.zip\"}"}}]},"solution":true,"metrics":{"__typename":"MessageMetrics","views":17191},"placeholder":false,"showMoveIndicator":false,"originalMessageForPlaceholder":null,"videos":{"__typename":"VideoConnection","edges":[],"totalCount":0,"pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null}},"isEscalated":null,"customFields":[]},"User:user:97":{"__typename":"User","id":"user:97","uid":97,"login":"svatada","biography":null,"registrationData":{"__typename":"RegistrationData","status":null,"registrationTime":"2017-03-29T21:22:20.544-07:00"},"deleted":false,"email":"","avatar":{"__typename":"UserAvatar","url":"https://community.snaplogic.com/t5/s/iaudz84835/images/dS05Ny02NDQyaUREMTQxQjI0NDU3NDUwMjc"},"entityType":"USER","eventPath":"community:iaudz84835/user:97"},"ModerationData:moderation_data:25987":{"__typename":"ModerationData","id":"moderation_data:25987","status":"UNMODERATED","rejectReason":null},"AssociatedImage:{\"url\":\"https://community.snaplogic.com/t5/s/iaudz84835/images/bS0yNTk4Ny02NTAyaTM1MTA5QUY2MDFGNDFGM0Q?revision=1\"}":{"__typename":"AssociatedImage","url":"https://community.snaplogic.com/t5/s/iaudz84835/images/bS0yNTk4Ny02NTAyaTM1MTA5QUY2MDFGNDFGM0Q?revision=1","title":"svatada_0-1717051210505.png","associationType":"BODY","width":495,"height":400,"altText":null},"AcceptedSolutionMessage:message:25987":{"__typename":"AcceptedSolutionMessage","author":{"__ref":"User:user:97"},"id":"message:25987","entityType":"FORUM_REPLY","eventPath":"category:product_categories/category:products/community:iaudz84835board:data_integration/message:25958/message:25987","revisionNum":1,"uid":25987,"depth":1,"hasGivenKudo":false,"subscribed":false,"board":{"__ref":"Forum:board:data_integration"},"parent":{"__ref":"ForumTopicMessage:message:25958"},"conversation":{"__ref":"Conversation:conversation:25958"},"subject":"Re: Structuring the Data receiving from the Union snap","moderationData":{"__ref":"ModerationData:moderation_data:25987"},"body":"Prajwal Try using GroupByN snap to merge the incoming documents into one
","body@stripHtml({\"removeProcessingText\":true,\"removeSpoilerMarkup\":true,\"removeTocMarkup\":true,\"truncateLength\":200})@stringLength":"93","postTime":"2024-05-29T23:40:22.762-07:00","lastPublishTime":"2024-05-29T23:40:22.762-07:00","images":{"__typename":"AssociatedImageConnection","edges":[{"__typename":"AssociatedImageEdge","cursor":"MjUuNHwyLjF8b3wyNXxfTlZffDE","node":{"__ref":"AssociatedImage:{\"url\":\"https://community.snaplogic.com/t5/s/iaudz84835/images/bS0yNTk4Ny02NTAyaTM1MTA5QUY2MDFGNDFGM0Q?revision=1\"}"}}],"totalCount":1,"pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null}},"attachments":{"__typename":"AttachmentConnection","pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null},"edges":[]},"solution":true,"metrics":{"__typename":"MessageMetrics","views":17166},"placeholder":false,"showMoveIndicator":false,"originalMessageForPlaceholder":null,"videos":{"__typename":"VideoConnection","edges":[],"totalCount":0,"pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null}},"isEscalated":null,"customFields":[]},"QueryVariables:ReplyList:message:25989:1":{"__typename":"QueryVariables","id":"ReplyList:message:25989:1","value":{"id":"message:25989","first":10,"sorts":{"kudosSumWeight":{"direction":"DESC","order":0},"postTime":{"direction":"ASC","order":1}},"repliesFirst":3,"repliesFirstDepthThree":1,"repliesSorts":{"kudosSumWeight":{"direction":"DESC","order":0},"postTime":{"direction":"ASC","order":1}},"useAvatar":true,"useAuthorLogin":true,"useAuthorRank":true,"useBody":true,"useKudosCount":true,"useTimeToRead":false,"useMedia":false,"useReadOnlyIcon":false,"useRepliesCount":true,"useSearchSnippet":false,"useAcceptedSolutionButton":true,"useSolvedBadge":false,"useAttachments":false,"attachmentsFirst":5,"useTags":false,"useNodeAncestors":false,"useUserHoverCard":false,"useNodeHoverCard":false,"useModerationStatus":true,"usePreviewSubjectModal":false,"useMessageStatus":true}},"CachedAsset:text:en_US-shared/client/components/users/UserAvatar-1755250098417":{"__typename":"CachedAsset","id":"text:en_US-shared/client/components/users/UserAvatar-1755250098417","value":{"altText":"{login}'s avatar","altTextGeneric":"User's avatar"},"localOverride":false},"CachedAsset:text:en_US-shared/client/components/ranks/UserRankLabel-1755250098417":{"__typename":"CachedAsset","id":"text:en_US-shared/client/components/ranks/UserRankLabel-1755250098417","value":{"altTitle":"Icon for {rankName} rank"},"localOverride":false},"CachedAsset:text:en_US-components/common/ExternalLinkWarningModal-1755250098417":{"__typename":"CachedAsset","id":"text:en_US-components/common/ExternalLinkWarningModal-1755250098417","value":{"title":"Leaving the Community","description":"You're about to leave this site and navigate to an external domain. Are you sure you want to continue?","action.submit":"Continue","action.cancel":"Go Back"},"localOverride":false},"CachedAsset:text:en_US-components/messages/AcceptedSolutionButton-1755250098417":{"__typename":"CachedAsset","id":"text:en_US-components/messages/AcceptedSolutionButton-1755250098417","value":{"accept":"Mark as Solution","accepted":"Marked as Solution","errorHeader":"Error!","errorAdd":"There was an error marking as solution.","errorRemove":"There was an error unmarking as solution.","solved":"Solved","topicAlreadySolvedErrorTitle":"Solution Already Exists","topicAlreadySolvedErrorDesc":"Refresh the browser to view the existing solution"},"localOverride":false},"CachedAsset:text:en_US-components/messages/ThreadedReplyList-1755250098417":{"__typename":"CachedAsset","id":"text:en_US-components/messages/ThreadedReplyList-1755250098417","value":{"title":"{count, plural, one{# Reply} other{# Replies}}","title@board:BLOG":"{count, plural, one{# Comment} other{# Comments}}","title@board:TKB":"{count, plural, one{# Comment} other{# Comments}}","title@board:IDEA":"{count, plural, one{# Comment} other{# Comments}}","title@board:OCCASION":"{count, plural, one{# Comment} other{# Comments}}","noRepliesTitle":"No Replies","noRepliesTitle@board:BLOG":"No Comments","noRepliesTitle@board:TKB":"No Comments","noRepliesTitle@board:IDEA":"No Comments","noRepliesTitle@board:OCCASION":"No Comments","noRepliesDescription":"Be the first to reply","noRepliesDescription@board:BLOG":"Be the first to comment","noRepliesDescription@board:TKB":"Be the first to comment","noRepliesDescription@board:IDEA":"Be the first to comment","noRepliesDescription@board:OCCASION":"Be the first to comment","messageReadOnlyAlert:BLOG":"Comments have been turned off for this post","messageReadOnlyAlert:TKB":"Comments have been turned off for this article","messageReadOnlyAlert:IDEA":"Comments have been turned off for this idea","messageReadOnlyAlert:FORUM":"Replies have been turned off for this discussion","messageReadOnlyAlert:OCCASION":"Comments have been turned off for this event"},"localOverride":false},"CachedAsset:text:en_US-components/attachments/AttachmentView/AttachmentViewChip-1755250098417":{"__typename":"CachedAsset","id":"text:en_US-components/attachments/AttachmentView/AttachmentViewChip-1755250098417","value":{"errorTitle":"Failed!","previewFile":"Preview File","downloadFile":"Download File {name}","removeFile":"Remove File {name}","errorBadExtension":"This file does not have a valid extension. \"{extensions}\" are the valid extensions.","errorFileEmpty":"This file is empty or does not exist.","errorTooLarge":"The maximum file size is: {maxFileSize}.","errorTooMany":"Too many attachments. The maximum number of attachments per message is: {maxAttachmentCount, number, integer}.","errorDuplicate":"This file is already attached."},"localOverride":false}}}},"page":"/forums/ForumMessagePage/ForumMessagePage","query":{"boardId":"data_integration","messageSubject":"structuring-the-data-receiving-from-the-union-snap","messageId":"25958","replyId":"25989"},"buildId":"tzrZqX6Puz2ajpVr66RMN","runtimeConfig":{"buildInformationVisible":false,"logLevelApp":"info","logLevelMetrics":"info","surveysEnabled":true,"openTelemetry":{"clientEnabled":false,"configName":"snaplogic","serviceVersion":"25.4.0","universe":"prod","collector":"http://localhost:4318","logLevel":"error","routeChangeAllowedTime":"5000","headers":"","enableDiagnostic":"false","maxAttributeValueLength":"4095"},"apolloDevToolsEnabled":false,"quiltLazyLoadThreshold":"3"},"isFallback":false,"isExperimentalCompile":false,"dynamicIds":["components_seo_QAPageSchema","components_community_Navbar_NavbarWidget","components_community_Breadcrumb_BreadcrumbWidget","components_messages_TopicWithThreadedReplyListWidget","components_messages_MessageListForNodeByRecentActivityWidget","components_customComponent_CustomComponent","components_community_FooterWidget","components_messages_MessageView_MessageViewStandard","components_external_components_ExternalComponent","components_community_FooterWidgetHelpLink","components_community_KhorosLogo","components_messages_EscalatedMessageBanner","shared_client_components_common_List_ListGroup","components_messages_MessageView","components_messages_MessageView_MessageViewInline","shared_client_components_common_Pager_PagerLoadMore","components_customComponent_CustomComponentContent_TemplateContent","shared_client_components_common_List_UnstyledList","shared_client_components_common_List_UnwrappedList","components_attachments_AttachmentView","components_attachments_AttachmentView_AttachmentViewChip"],"appGip":true,"scriptLoader":[]}