Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics 365 | Integration, Dataverse...
Unanswered

Create Map Data Structure for Fast Lookup

(3) ShareShare
ReportReport
Posted on by 6
Howdy all,
 
I've been trying for a few days to create a map like data structure so that I can immediately lookup a certain data property. The idea would be to have a map that looks like the following while being able to look up each individual entry by name : 
 
{
    "body": [
        {
            "file.csv": "90275834"
        },
        {
            "file1.csv": "362251262"
        },
        {
            "file2.csv": "129143557"
        },
        {
            "file3.csv": "112120"
        }
   ]
}
 
So far I've been able to populate an array with mapped values as I've just shown,
but have had issues in generating a dynamic map structure within a single object. I wanted
to create an empty object, and then dynamically populate it with each array entry using 
a 'set Variable' and writing out a function : 
 
setProperty(variables('fileMap'), first(keys(items('Apply_to_each_1'))), items('Apply_to_each_1')[first(keys(items('Apply_to_each_1')))])
 
, but this gets a "self reference not supported" error. Does anyone have any ideas on how to do this?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,711 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,458 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans