<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:48:46 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>[SERVER-18794] Add an aggregation expression to convert an object to an array of key, value pairs</title>
                <link>https://jira.mongodb.org/browse/SERVER-18794</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;In many cases, it would be useful to convert an object to an array. We should add an aggregation expression to do so. For example, it could be called &lt;tt&gt;$objectToArray&lt;/tt&gt;, and do something like this:&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;   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;&amp;gt; db.foo.insert({_id: 0, subDoc: {a: 1, b: 3, c: &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;&quot;example&quot;&lt;/span&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;}});&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&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;   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;&amp;gt; db.foo.aggregate([{$project: {expanded: {$objectToArray: &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;&quot;$subDoc&quot;&lt;/span&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;}}}])&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&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-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;{_id: 0, expanded: [{k: &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;&quot;a&quot;&lt;/span&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;, v: 1}, {k: &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;&quot;b&quot;&lt;/span&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;, v: 3}, {k: &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;&quot;c&quot;&lt;/span&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;, v: &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;&quot;example&quot;&lt;/span&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;}]}&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;h5&gt;&lt;a name=&quot;OriginalDescription&quot;&gt;&lt;/a&gt;Original Description&lt;/h5&gt;
&lt;p&gt;Currently, if a collection contains the following document: &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;{_id: 0, data: {a: 1, b: 2, c: 3}}&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;There is no way to unwind that one document into the following three documents:&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;   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;{_id: 0, data: {a: 1}}&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&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;   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;{_id: 0, data: {b: 2}}&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&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-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;{_id: 0, data: {c: 3}}&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;One way to accomplish this would be to add a stage to unwind documents, e.g.&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;db.coll.aggregate([{$objectToArray: {field: &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;&apos;$data&apos;&lt;/span&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;}}])&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;Which would yield the following document, which could then be unwound to produce the desired result:&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;{_id: 0, data: [{a: 1}, {b: 2}, {c: 3}]}&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;</description>
                <environment></environment>
        <key id="208022">SERVER-18794</key>
            <summary>Add an aggregation expression to convert an object to an array of key, value pairs</summary>
                <type id="2" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14711&amp;avatarType=issuetype">New Feature</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="tess.avitabile@mongodb.com">Tess Avitabile</assignee>
                                    <reporter username="lch1990710">Lee Chi Hang</reporter>
                        <labels>
                            <label>expression</label>
                            <label>stage</label>
                    </labels>
                <created>Wed, 3 Jun 2015 09:00:30 +0000</created>
                <updated>Wed, 19 Jul 2017 15:48:19 +0000</updated>
                            <resolved>Fri, 3 Mar 2017 18:54:20 +0000</resolved>
                                                    <fixVersion>3.4.4</fixVersion>
                    <fixVersion>3.5.4</fixVersion>
                                    <component>Aggregation Framework</component>
                                        <votes>15</votes>
                                    <watches>30</watches>
                                                                                                                <comments>
                            <comment id="1535418" author="xgen-internal-githook" created="Tue, 28 Mar 2017 21:24:21 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;sindbach&apos;, u&apos;name&apos;: u&apos;Wan Bachtiar&apos;, u&apos;email&apos;: u&apos;sindbach@gmail.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-18794&quot; title=&quot;Add an aggregation expression to convert an object to an array of key, value pairs&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-18794&quot;&gt;&lt;del&gt;SERVER-18794&lt;/del&gt;&lt;/a&gt; Add aggregation pipeline expression $objectToArray&lt;/p&gt;

&lt;p&gt;Closes #1&lt;/p&gt;

&lt;p&gt;Signed-off-by: Tess Avitabile &amp;lt;tess.avitabile@mongodb.com&amp;gt;&lt;br/&gt;
(cherry picked from commit 6a6bffee00e95776f7dd50e96aa0b8874ca7a01d)&lt;br/&gt;
Branch: v3.4&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/02eeab70014675b3c41839197c5f684ae6534f95&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/02eeab70014675b3c41839197c5f684ae6534f95&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1518907" author="tess.avitabile" created="Wed, 8 Mar 2017 15:21:56 +0000"  >&lt;p&gt;Okay, thank you. It is fine to leave the commit message as is. Sorry for the mistake!&lt;/p&gt;</comment>
                            <comment id="1518525" author="wan.bachtiar" created="Wed, 8 Mar 2017 01:25:04 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=tess.avitabile&quot; class=&quot;user-hover&quot; rel=&quot;tess.avitabile&quot;&gt;tess.avitabile&lt;/a&gt; correct. The pull-request was just on my fork &lt;a href=&quot;https://github.com/sindbach/mongo&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/sindbach/mongo&lt;/a&gt;,  and not a pull-request on the &lt;a href=&quot;https://github.com/mongodb/mongo&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo&lt;/a&gt; &lt;br/&gt;
Please let me know if there&apos;s anything I could do to help rectify&lt;/p&gt;</comment>
                            <comment id="1517919" author="tess.avitabile" created="Tue, 7 Mar 2017 16:33:07 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=wan.bachtiar&quot; class=&quot;user-hover&quot; rel=&quot;wan.bachtiar&quot;&gt;wan.bachtiar&lt;/a&gt;, was there a pull request on the public repo, or just on your fork? I reviewed the one that was on your fork.&lt;/p&gt;</comment>
                            <comment id="1515861" author="david.storch" created="Fri, 3 Mar 2017 22:13:38 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=tess.avitabile&quot; class=&quot;user-hover&quot; rel=&quot;tess.avitabile&quot;&gt;tess.avitabile&lt;/a&gt;, what was the correct pull request number? We should ensure that it is linked to this ticket for future reference.&lt;/p&gt;</comment>
                            <comment id="1515697" author="tess.avitabile" created="Fri, 3 Mar 2017 20:00:23 +0000"  >&lt;p&gt;Apologies, the pull request number in the commit message is incorrect.&lt;/p&gt;</comment>
                            <comment id="1515621" author="xgen-internal-githook" created="Fri, 3 Mar 2017 18:53:28 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;sindbach&apos;, u&apos;name&apos;: u&apos;Wan Bachtiar&apos;, u&apos;email&apos;: u&apos;sindbach@gmail.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-18794&quot; title=&quot;Add an aggregation expression to convert an object to an array of key, value pairs&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-18794&quot;&gt;&lt;del&gt;SERVER-18794&lt;/del&gt;&lt;/a&gt; Add aggregation pipeline expression $objectToArray&lt;/p&gt;

&lt;p&gt;Closes #1&lt;/p&gt;

&lt;p&gt;Signed-off-by: Tess Avitabile &amp;lt;tess.avitabile@mongodb.com&amp;gt;&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/6a6bffee00e95776f7dd50e96aa0b8874ca7a01d&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/6a6bffee00e95776f7dd50e96aa0b8874ca7a01d&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1479710" author="charlie.swanson" created="Wed, 18 Jan 2017 20:52:44 +0000"  >&lt;p&gt;It has come to my attention that there is an open pull request to add this feature (thanks &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=lch1990710&quot; class=&quot;user-hover&quot; rel=&quot;lch1990710&quot;&gt;lch1990710&lt;/a&gt;!). This is great! I would love if someone from the community could help us out here. Unfortunately, we cannot accept it immediately. The syntax of the new expression in the pull request does not match the syntax proposed in the top of the description.&lt;/p&gt;

&lt;p&gt;More generally, we have not yet decided what the syntax of such an operator should be. I like the syntax of the new description since it allows manipulation of field names, and would open up several use cases (e.g. what are all the field names present in the collection?). This issue is high on the (tentative) list of expressions to add in the upcoming release, so we hope to meet up and agree on syntax in the coming months.&lt;/p&gt;

&lt;p&gt;I will check back in when we have agreed on a specification for this addition to the language, and hopefully we can revive the pull request at that point.&lt;/p&gt;</comment>
                            <comment id="1217439" author="jdegoes" created="Tue, 29 Mar 2016 00:14:40 +0000"  >&lt;p&gt;Awesome. Hope that means it gets on the roadmap, too. &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.mongodb.org/images/icons/emoticons/smile.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</comment>
                            <comment id="1212729" author="charlie.swanson" created="Wed, 23 Mar 2016 17:18:24 +0000"  >&lt;p&gt;Hi all,&lt;/p&gt;

&lt;p&gt;After some internal discussion, we&apos;ve decided that the best way forward is to add two expressions, along the lines of &lt;tt&gt;$objectToArray&lt;/tt&gt; and &lt;tt&gt;$arrayToObject&lt;/tt&gt;. I&apos;ve converted this ticket to request the functionality of &lt;tt&gt;$objectToArray&lt;/tt&gt;, and will file a separate ticket for &lt;tt&gt;$arrayToObject&lt;/tt&gt;, then link that to this one.&lt;/p&gt;

&lt;p&gt;I believe this will cover all use cases, but some cases may require use of other expressions.&lt;/p&gt;</comment>
                            <comment id="933397" author="lch1990710" created="Sat, 6 Jun 2015 17:07:28 +0000"  >&lt;p&gt;Ops, sorry for missing reading that haha, the idea seem similar, what od u think about which have a wider use case with other aggregate stage? Seem simply $objectToArray wilp be more user friendly.&lt;br/&gt;
or you want to transfer the discussion to that ticket?? I agree that better close one of the ticket. &lt;br/&gt;
And I will modiy and push the code after having the conclusion &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.mongodb.org/images/icons/emoticons/smile.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</comment>
                            <comment id="933394" author="sylvain leroux" created="Sat, 6 Jun 2015 16:54:22 +0000"  >&lt;p&gt;Oh, sorry for the confusion. Did you read &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-11392?focusedCommentId=933366&amp;amp;page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-933366&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;my comment on server-11392&lt;/a&gt; ? There are slightly different approaches to this idea. Worth taking time to discuss them, I think.&lt;/p&gt;</comment>
                            <comment id="933393" author="lch1990710" created="Sat, 6 Jun 2015 16:10:49 +0000"  >&lt;p&gt;What I suggest in this ticket is add I function to convert object to array for example named it &quot;$objectToArray&quot;&lt;/p&gt;

&lt;p&gt;you may Google it after 3.1 release &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.mongodb.org/images/icons/emoticons/smile.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</comment>
                            <comment id="933391" author="sylvain leroux" created="Sat, 6 Jun 2015 15:48:47 +0000"  >&lt;p&gt;@Lee Chi Hang&lt;br/&gt;
That sounds a good idea. I wasn&apos;t even aware of `$objectToArray` &amp;#8211; and by &lt;a href=&quot;https://www.google.fr/search?q=mongodb+%22%24objectToArray%22&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;googling&lt;/a&gt; I can&apos;t even find a reference on it...&lt;/p&gt;</comment>
                            <comment id="933382" author="lch1990710" created="Sat, 6 Jun 2015 14:34:29 +0000"  >&lt;p&gt;I am thinking follow with $unwind is one of the use case of $objectToArray.&lt;br/&gt;
Other function for array can be use after $objectToArray for difference use case.&lt;br/&gt;
I think ticket server-11392 should close because $objectToArray and other function already cover more use cases. &lt;/p&gt;</comment>
                            <comment id="933380" author="sylvain leroux" created="Sat, 6 Jun 2015 13:57:11 +0000"  >&lt;p&gt;Shouldn&apos;t be this ticket closed and consolidated with &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-11392&quot; title=&quot;$unwind on subdocuments&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-11392&quot;&gt;&lt;del&gt;SERVER-11392&lt;/del&gt;&lt;/a&gt; as a duplicate (like &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-15175&quot; title=&quot;Add a way to &amp;quot;unwind&amp;quot; fields in a document.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-15175&quot;&gt;&lt;del&gt;SERVER-15175&lt;/del&gt;&lt;/a&gt; was) ? That would avoid fragmentation of the discussion.&lt;/p&gt;</comment>
                            <comment id="931424" author="ramon.fernandez" created="Thu, 4 Jun 2015 12:40:22 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=lch1990710&quot; class=&quot;user-hover&quot; rel=&quot;lch1990710&quot;&gt;lch1990710&lt;/a&gt;, I&apos;ve closed &lt;a href=&quot;https://github.com/mongodb/mongo/pull/972&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;your pull request&lt;/a&gt; as it contained previous commits for other tickets. Please open a new pull request with just your changes for this feature request.&lt;/p&gt;

&lt;p&gt;Since your pull request is adding new functionality, it is strongly recommended that you add a test to check that this new functionality is working as expected. See for example &lt;a href=&quot;https://github.com/mongodb/mongo/commit/52c12e84354e319b1137b1bc7b618dce4396f748&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;the commit for the new $isArray operator&lt;/a&gt; as a recent example of what we expect in terms of testing for new features.&lt;/p&gt;

&lt;p&gt;Thanks,&lt;br/&gt;
Ram&#243;n.&lt;/p&gt;</comment>
                            <comment id="931127" author="ramon.fernandez" created="Wed, 3 Jun 2015 23:22:37 +0000"  >&lt;p&gt;Thanks for you report &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=lch1990710&quot; class=&quot;user-hover&quot; rel=&quot;lch1990710&quot;&gt;lch1990710&lt;/a&gt;, we&apos;ve set the fixversion to &quot;Needs Triage&quot; so this feature request is taken into consideration during the next planning round.&lt;/p&gt;

&lt;p&gt;Regards,&lt;br/&gt;
Ram&#243;n.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10420">
                    <name>Backports</name>
                                            <outwardlinks description="backported by">
                                                        </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                        <issuelink>
            <issuekey id="364251">CSHARP-1939</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10320">
                    <name>Documented</name>
                                                                <inwardlinks description="is documented by">
                                                        </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="39763">SERVER-5947</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="95809">SERVER-11392</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="399195">DOCS-10459</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="364249">DRIVERS-358</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="347668">SERVER-27774</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="274594">SERVER-23310</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="14613">SERVER-2507</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>18.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_12450" key="com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes">
                        <customfieldname>Backport Requested</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="14340"><![CDATA[v3.4]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10038"><![CDATA[Fully Compatible]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_13552" key="com.go2group.jira.plugin.crm:crm_generic_field">
                        <customfieldname>Case</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[[500A000000W8WRXIA3]]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 3 Jun 2015 19:27:27 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        6 years, 46 weeks, 1 day 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>PM-741</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>emily.hall</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            6 years, 46 weeks, 1 day ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>charlie.swanson@mongodb.com</customfieldvalue>
            <customfieldvalue>david.storch@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>jdegoes</customfieldvalue>
            <customfieldvalue>lch1990710</customfieldvalue>
            <customfieldvalue>ramon.fernandez@mongodb.com</customfieldvalue>
            <customfieldvalue>Sylvain Leroux</customfieldvalue>
            <customfieldvalue>tess.avitabile@mongodb.com</customfieldvalue>
            <customfieldvalue>wan.bachtiar@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrl48v:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hsrtxb:</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_23361" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Requested By</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="1570">Query 2017-03-06</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_22870" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Triagers</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrixgn:</customfieldvalue>

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