<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Map index delete</title><link>https://community.appian.com/discussions/f/new-to-appian/39143/map-index-delete</link><description>Hello All, 
 
 I am facing issue with the following map. I am building dynamic filters. Here is the map is the output. But I wanted to delete logicalExpression:{} from the map. It can be there at any level. If logicalExpression is null then my resulted</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Map index delete</title><link>https://community.appian.com/thread/148331?ContentTypeID=1</link><pubDate>Fri, 23 May 2025 07:10:45 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f3ff47be-a6da-4e6f-a014-bc21e353406b</guid><dc:creator>David Jimenez </dc:creator><description>&lt;p&gt;a!localVariables(&lt;br /&gt; local!conditions: {&lt;br /&gt; a!map(&lt;br /&gt; operator: &amp;quot;AND&amp;quot;,&lt;br /&gt; logicalExpressions: {&lt;br /&gt; a!map(&lt;br /&gt; operator: &amp;quot;AND&amp;quot;,&lt;br /&gt; filters: {&lt;br /&gt; a!map(field: null, operator: null, value: null),&lt;br /&gt; a!map(field: null, operator: null, value: null)&lt;br /&gt; },&lt;br /&gt; logicalExpressions: {&lt;br /&gt; a!map(&lt;br /&gt; operator: &amp;quot;AND&amp;quot;,&lt;br /&gt; filters: {&lt;br /&gt; a!map(field: null, operator: null, value: null),&lt;br /&gt; a!map(field: null, operator: null, value: null)&lt;br /&gt; },&lt;br /&gt; logicalExpressions: {}&lt;br /&gt; ),&lt;br /&gt; a!map(&lt;br /&gt; operator: &amp;quot;AND&amp;quot;,&lt;br /&gt; filters: {&lt;br /&gt; a!map(field: null, operator: null, value: null),&lt;br /&gt; a!map(field: null, operator: null, value: null)&lt;br /&gt; },&lt;br /&gt; logicalExpressions: {}&lt;br /&gt; )&lt;br /&gt; }&lt;br /&gt; )&lt;br /&gt; }&lt;br /&gt; )&lt;br /&gt; },&lt;br /&gt; a!fromjson(substitute(a!tojson(local!conditions),&amp;quot;,&amp;quot;&amp;quot;logicalExpressions&amp;quot;&amp;quot;:[]&amp;quot;,&amp;quot;&amp;quot;))&lt;br /&gt;)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Map index delete</title><link>https://community.appian.com/thread/148322?ContentTypeID=1</link><pubDate>Thu, 22 May 2025 17:26:34 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c18e049a-5430-401e-be7d-f45d5c992a94</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;It&amp;#39;s a little ambiguous what you&amp;#39;re after, without some examples of different inputs and what you would expect the outputs to be (and why).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Generally, you can&amp;#39;t exactly &amp;quot;delete&amp;quot; something from a map, but similarly to the JSON approach, you could always structure an expression to build a new map from an existing map and just omit certain properties when needed.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Map index delete</title><link>https://community.appian.com/thread/148317?ContentTypeID=1</link><pubDate>Thu, 22 May 2025 11:39:52 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4fe60c83-4cff-43df-8734-6a27a1b38700</guid><dc:creator>David Jimenez </dc:creator><description>&lt;p&gt;it would be something like....&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;a!fromjson(substitute(a!tosjon(local!conditions), &amp;quot;logicalExpressions&amp;quot;&amp;quot;:[]&amp;quot;, null))&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;But you have to be care of closing tags, and keep the json structure&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Map index delete</title><link>https://community.appian.com/thread/148313?ContentTypeID=1</link><pubDate>Thu, 22 May 2025 10:54:49 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:97ab2685-dbe4-4d40-89bb-7db8fc5f8a92</guid><dc:creator>ak0642</dc:creator><description>&lt;p&gt;Can you pls give me an example for JSON approach&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Map index delete</title><link>https://community.appian.com/thread/148308?ContentTypeID=1</link><pubDate>Thu, 22 May 2025 10:22:21 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:08e0e33a-217c-4b26-b121-807e98dfea60</guid><dc:creator>David Jimenez </dc:creator><description>&lt;p&gt;You ned to use a recursive approach... or try converting the array to json... replace the elements with a regular expression, and convert it again to an appian structure..&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Map index delete</title><link>https://community.appian.com/thread/148307?ContentTypeID=1</link><pubDate>Thu, 22 May 2025 10:04:21 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:1cd36934-5956-4ac4-a72d-01a23931a8b2</guid><dc:creator>ak0642</dc:creator><description>&lt;p&gt;Yes you are correct&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Map index delete</title><link>https://community.appian.com/thread/148306?ContentTypeID=1</link><pubDate>Thu, 22 May 2025 09:28:35 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4360efea-8ff1-4376-b6fc-2d7af2b5691a</guid><dc:creator>EREN_YEAGER</dc:creator><description>&lt;p&gt;As far as I understand, this may require a recursive approach, given that the structure is hierarchical and can have multiple levels.&lt;br /&gt; Please feel free to correct me if I&amp;rsquo;m mistaken.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>