<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:01:08 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[DOCS-10675] [Server] Revision on arrayToObject </title>
                <link>https://jira.mongodb.org/browse/DOCS-10675</link>
                <project id="10380" key="DOCS">Documentation</project>
                    <description>&lt;p&gt;Instead of using $literal in the two example, just wrap the array in another array.&lt;/p&gt;

&lt;p&gt;Use a field expression instead of fixed values to show that it&apos;s possible (and that can&apos;t be done with $literal)&lt;/p&gt;</description>
                <environment>&lt;br/&gt;
&lt;br/&gt;
</environment>
        <key id="416207">DOCS-10675</key>
            <summary>[Server] Revision on arrayToObject </summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="9">Done</resolution>
                                        <assignee username="david.hou@mongodb.com">David Hou</assignee>
                                    <reporter username="asya.kamsky@mongodb.com">Asya Kamsky</reporter>
                        <labels>
                            <label>collector-298ba4e7</label>
                            <label>docs-triage</label>
                            <label>reopened</label>
                    </labels>
                <created>Mon, 14 Aug 2017 14:13:22 +0000</created>
                <updated>Mon, 30 Oct 2023 21:07:49 +0000</updated>
                            <resolved>Wed, 30 Nov 2022 21:15:53 +0000</resolved>
                                                    <fixVersion>Server_Docs_20231030</fixVersion>
                                    <component>manual</component>
                    <component>Server</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="5049680" author="xgen-internal-githook" created="Mon, 12 Dec 2022 23:07:32 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;davidhou17&apos;, &apos;email&apos;: &apos;55004296+davidhou17@users.noreply.github.com&apos;, &apos;username&apos;: &apos;davidhou17&apos;}
&lt;p&gt;Message: (&lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-10675&quot; title=&quot;[Server] Revision on arrayToObject &quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-10675&quot;&gt;&lt;del&gt;DOCS-10675&lt;/del&gt;&lt;/a&gt;): Remove $literal from first $arrayToObject example  (#2193)&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;change  to brackets&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;tech review feedback&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;tech review feedback pt 2&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;copy review feedback&lt;br/&gt;
Branch: indexes-refactor&lt;br/&gt;
&lt;a href=&quot;https://github.com/10gen/docs-mongodb-internal/commit/bcf7bcc3704b04da5262f9aa5a89bfe27097b1fa&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/10gen/docs-mongodb-internal/commit/bcf7bcc3704b04da5262f9aa5a89bfe27097b1fa&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="5022974" author="xgen-internal-githook" created="Thu, 1 Dec 2022 18:04:40 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;davidhou17&apos;, &apos;email&apos;: &apos;55004296+davidhou17@users.noreply.github.com&apos;, &apos;username&apos;: &apos;davidhou17&apos;}
&lt;p&gt;Message: (&lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-10675&quot; title=&quot;[Server] Revision on arrayToObject &quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-10675&quot;&gt;&lt;del&gt;DOCS-10675&lt;/del&gt;&lt;/a&gt;): Remove $literal from first $arrayToObject example  (#2193) (#2214)&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;change  to brackets&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;tech review feedback&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;tech review feedback pt 2&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;copy review feedback&lt;br/&gt;
Branch: v6.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/10gen/docs-mongodb-internal/commit/18f64467375c8940022205b4833ee8b0fa4d5ede&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/10gen/docs-mongodb-internal/commit/18f64467375c8940022205b4833ee8b0fa4d5ede&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="5022971" author="xgen-internal-githook" created="Thu, 1 Dec 2022 18:04:30 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;davidhou17&apos;, &apos;email&apos;: &apos;55004296+davidhou17@users.noreply.github.com&apos;, &apos;username&apos;: &apos;davidhou17&apos;}
&lt;p&gt;Message: (&lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-10675&quot; title=&quot;[Server] Revision on arrayToObject &quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-10675&quot;&gt;&lt;del&gt;DOCS-10675&lt;/del&gt;&lt;/a&gt;): Remove $literal from first $arrayToObject example  (#2193) (#2215)&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;change  to brackets&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;tech review feedback&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;tech review feedback pt 2&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;copy review feedback&lt;br/&gt;
Branch: v5.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/10gen/docs-mongodb-internal/commit/9fce6eecc66b8c42a1f766ba8243acfcb61d9c99&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/10gen/docs-mongodb-internal/commit/9fce6eecc66b8c42a1f766ba8243acfcb61d9c99&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="5022968" author="xgen-internal-githook" created="Thu, 1 Dec 2022 18:04:20 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;davidhou17&apos;, &apos;email&apos;: &apos;55004296+davidhou17@users.noreply.github.com&apos;, &apos;username&apos;: &apos;davidhou17&apos;}
&lt;p&gt;Message: (&lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-10675&quot; title=&quot;[Server] Revision on arrayToObject &quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-10675&quot;&gt;&lt;del&gt;DOCS-10675&lt;/del&gt;&lt;/a&gt;): Remove $literal from first $arrayToObject example  (#2193) (#2216)&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;change  to brackets&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;tech review feedback&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;tech review feedback pt 2&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;copy review feedback&lt;br/&gt;
Branch: v4.4&lt;br/&gt;
&lt;a href=&quot;https://github.com/10gen/docs-mongodb-internal/commit/19d427729251e54a49f32c6268f9740e0dcaef64&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/10gen/docs-mongodb-internal/commit/19d427729251e54a49f32c6268f9740e0dcaef64&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="5022967" author="xgen-internal-githook" created="Thu, 1 Dec 2022 18:04:10 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;davidhou17&apos;, &apos;email&apos;: &apos;55004296+davidhou17@users.noreply.github.com&apos;, &apos;username&apos;: &apos;davidhou17&apos;}
&lt;p&gt;Message: (&lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-10675&quot; title=&quot;[Server] Revision on arrayToObject &quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-10675&quot;&gt;&lt;del&gt;DOCS-10675&lt;/del&gt;&lt;/a&gt;): Remove $literal from first $arrayToObject example  (#2193) (#2217)&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;change  to brackets&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;tech review feedback&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;tech review feedback pt 2&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;copy review feedback&lt;br/&gt;
Branch: v4.2&lt;br/&gt;
&lt;a href=&quot;https://github.com/10gen/docs-mongodb-internal/commit/2129a21d8534738e497f322601976ccca1e47592&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/10gen/docs-mongodb-internal/commit/2129a21d8534738e497f322601976ccca1e47592&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="5020305" author="xgen-internal-githook" created="Wed, 30 Nov 2022 21:29:26 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;davidhou17&apos;, &apos;email&apos;: &apos;55004296+davidhou17@users.noreply.github.com&apos;, &apos;username&apos;: &apos;davidhou17&apos;}
&lt;p&gt;Message: (&lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-10675&quot; title=&quot;[Server] Revision on arrayToObject &quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-10675&quot;&gt;&lt;del&gt;DOCS-10675&lt;/del&gt;&lt;/a&gt;): Remove $literal from first $arrayToObject example  (#2193)&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;change  to brackets&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;tech review feedback&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;tech review feedback pt 2&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;copy review feedback&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/10gen/docs-mongodb-internal/commit/bcf7bcc3704b04da5262f9aa5a89bfe27097b1fa&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/10gen/docs-mongodb-internal/commit/bcf7bcc3704b04da5262f9aa5a89bfe27097b1fa&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="4943966" author="asya" created="Tue, 1 Nov 2022 13:09:11 +0000"  >&lt;p&gt;more specifically, using `$literal` is only useful when you have literal values you want to convert.  However, usually the user will be converting fields and expressions using field values and that means they cannot use `$literal` so having every example only show how to do this with literal (aka constant) fields is not very useful!&lt;/p&gt;</comment>
                            <comment id="4939544" author="JIRAUSER1264463" created="Mon, 31 Oct 2022 14:19:02 +0000"  >&lt;p&gt;Have reviewed with &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=asya.kamsky%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;asya.kamsky@mongodb.com&quot;&gt;asya.kamsky@mongodb.com&lt;/a&gt;. Her request is more user facing and solves for the question about whether a user wants to use a literal or no.&#160;&lt;/p&gt;</comment>
                            <comment id="1647519" author="asya" created="Mon, 14 Aug 2017 14:20:23 +0000"  >&lt;p&gt;Also, should add a note about what happens if the same field name (&quot;k&quot; value) appears more than once in the array - the first value (&quot;v&quot; value) wins.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;edit&lt;/b&gt; this part was already done.&lt;/p&gt;</comment>
                            <comment id="1647517" author="asya" created="Mon, 14 Aug 2017 14:18:13 +0000"  >&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;{ $arrayToObject: { $literal: [{ &quot;k&quot;: &quot;item&quot;, &quot;v&quot;: &quot;abc123&quot;}, { &quot;k&quot;: &quot;qty&quot;, &quot;v&quot;: 25 } ] } }&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;

&lt;p&gt;should just be&lt;/p&gt;
&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;{ $arrayToObject: [ [{ &quot;k&quot;: &quot;item&quot;, &quot;v&quot;: &quot;abc123&quot;}, { &quot;k&quot;: &quot;qty&quot;, &quot;v&quot;: 25 } ] ] }&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;

&lt;p&gt;The reason you need second set of [ ] is because it tells arrayToObject there inside it are its arguments.  If they are missing, it will interpret inner array [ ] and give an error that it got two arguments when it expected one.&lt;/p&gt;

&lt;p&gt;$literal only works when everything is literal but if, say, 25 was coming from another field then you couldn&apos;t use $literal and would &lt;b&gt;have&lt;/b&gt; to use [ ].&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>10.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 14 Aug 2017 14:30:04 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        1 year, 8 weeks, 2 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></customfieldvalue>


                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                            <customfield id="customfield_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>DOCSP-11701</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>emet.ozar@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            1 year, 8 weeks, 2 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                            <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>asya.kamsky@mongodb.com</customfieldvalue>
            <customfieldvalue>david.hou@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>sarah.olson@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|htcy3j:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|ht4p53:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10053" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time In Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|htck6f:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                </customfields>
    </item>
</channel>
</rss>