<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to retain a value over multiple &amp;quot;rows&amp;quot; in JSON using mapping in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-retain-a-value-over-multiple-quot-rows-quot-in-JSON-using/m-p/959031#M374244</link>
    <description>&lt;P&gt;Yes, that is exactly the option I was looking for. Thank you! In the past Google would always directly send me to the correct onlinedoc pages when searching for things like this. But nowadays I rarely end up on the correct SAS pages. I wonder if that is a problem with Google or a problem with the SAS documentation.&lt;/P&gt;</description>
    <pubDate>Wed, 12 Feb 2025 12:57:07 GMT</pubDate>
    <dc:creator>SanderB</dc:creator>
    <dc:date>2025-02-12T12:57:07Z</dc:date>
    <item>
      <title>How to retain a value over multiple "rows" in JSON using mapping</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-retain-a-value-over-multiple-quot-rows-quot-in-JSON-using/m-p/958921#M374232</link>
      <description>&lt;P&gt;Let's say we have the following situation in a JSON file:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;"retainthis" : "X" ,
"rows" : [
&amp;nbsp; &amp;nbsp;{ var = 0 } ,
&amp;nbsp; &amp;nbsp;{ var = 1 }
&amp;nbsp;]&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;And we want the following table when we read this JSON file with a libname statement using a map:&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;X&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;X&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I remember correctly there is a certain attribute you can use in the map to make sure the X value is retained. You have to specify name, type, path, length, etc. What attribute could we add to the map so that it retains the value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can't find it in the SAS document anywhere.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Feb 2025 14:45:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-retain-a-value-over-multiple-quot-rows-quot-in-JSON-using/m-p/958921#M374232</guid>
      <dc:creator>SanderB</dc:creator>
      <dc:date>2025-02-11T14:45:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to retain a value over multiple "rows" in JSON using mapping</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-retain-a-value-over-multiple-quot-rows-quot-in-JSON-using/m-p/958931#M374234</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are you looking for the below found in the&amp;nbsp;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lestmtsglobal/n1jfdetszx99ban1rl4zll6tej7j.htm" target="_blank" rel="noopener"&gt;LIBNAME Statement: JSON Engine&lt;/A&gt;&amp;nbsp;documentation?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Amir_0-1739293700394.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/104522iD3924EE13EE241EE/image-size/large?v=v2&amp;amp;px=999" role="button" title="Amir_0-1739293700394.png" alt="Amir_0-1739293700394.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks &amp;amp; kind regards,&lt;/P&gt;
&lt;P&gt;Amir.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Feb 2025 17:09:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-retain-a-value-over-multiple-quot-rows-quot-in-JSON-using/m-p/958931#M374234</guid>
      <dc:creator>Amir</dc:creator>
      <dc:date>2025-02-11T17:09:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to retain a value over multiple "rows" in JSON using mapping</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-retain-a-value-over-multiple-quot-rows-quot-in-JSON-using/m-p/959031#M374244</link>
      <description>&lt;P&gt;Yes, that is exactly the option I was looking for. Thank you! In the past Google would always directly send me to the correct onlinedoc pages when searching for things like this. But nowadays I rarely end up on the correct SAS pages. I wonder if that is a problem with Google or a problem with the SAS documentation.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Feb 2025 12:57:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-retain-a-value-over-multiple-quot-rows-quot-in-JSON-using/m-p/959031#M374244</guid>
      <dc:creator>SanderB</dc:creator>
      <dc:date>2025-02-12T12:57:07Z</dc:date>
    </item>
  </channel>
</rss>

