<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Converting an array of String objects to an array of Object objects in Flex</title>
	<atom:link href="http://blog.flexexamples.com/2008/03/26/converting-an-array-of-string-objects-to-an-array-of-object-objects-in-flex/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.flexexamples.com/2008/03/26/converting-an-array-of-string-objects-to-an-array-of-object-objects-in-flex/</link>
	<description>Just a bunch of Adobe Flex Examples</description>
	<lastBuildDate>Mon, 22 Mar 2010 09:31:18 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Visi</title>
		<link>http://blog.flexexamples.com/2008/03/26/converting-an-array-of-string-objects-to-an-array-of-object-objects-in-flex/comment-page-1/#comment-2965</link>
		<dc:creator>Visi</dc:creator>
		<pubDate>Tue, 08 Apr 2008 07:05:02 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/03/26/converting-an-array-of-string-objects-to-an-array-of-object-objects-in-flex/#comment-2965</guid>
		<description>Greate,
I really appreiciate the Peter work and Chetan suggetion of improvement in the code snippet.
I have a query in this respect. I am getting data in following format. How can I display the select box using the arrVisibility array and selected option value using Visibility element value. And also how can I display he other objects value like obj_UsersVO] =&gt; stdClass Object and [obj_CommonVO] =&gt; stdClass Object in the data grid.
Can you please help me as I am new to flex.

[0] =&gt; FeedbackVO Object
        (
            [IdFeedback] =&gt; 1
            [FeedbackType] =&gt; A
            [TrackId] =&gt; 1
            [Rating] =&gt; 1
            [Visibility] =&gt; V
            [CreatedOn] =&gt; 2008-01-01 00:00:00
            [CreatedBy] =&gt; 35
            [Comments] =&gt; 1111
            [UserId] =&gt; 1
            [arrVisibility] =&gt; Array
                (
                    [V] =&gt; Visible
                    [H] =&gt; Hidden
                    [F] =&gt; Featured
                )

            [TrackTitle] =&gt; junoon1111
            [obj_UsersVO] =&gt; stdClass Object
                (
                    [firstname] =&gt; Scott
                    [lastname] =&gt; Tiger
                )

            [obj_CommonVO] =&gt; stdClass Object
                (
                    [UserName] =&gt; Tiger Scott
                    [Play] =&gt; Yes
                )

        )

    [1] =&gt; FeedbackVO Object
        (
            [IdFeedback] =&gt; 2
            [FeedbackType] =&gt; A
            [TrackId] =&gt; 1
            [PromoId] =&gt; 1
            [Rating] =&gt; 1
            [Supporting] =&gt; Y
            [Visibility] =&gt; V
            [CreatedOn] =&gt; 2008-01-01 00:00:00
            [CreatedBy] =&gt; 35
            [Comments] =&gt; 2222
            [UpdatedOn] =&gt; 2008-01-01 00:00:00
            [UpdatedBy] =&gt; 2
            [UserId] =&gt; 2
            [FeedbackArray] =&gt;
            [userRecord] =&gt;
            [commonRecord] =&gt;
            [arrVisibility] =&gt; Array
                (
                    [V] =&gt; Visible
                    [H] =&gt; Hidden
                    [F] =&gt; Featured
                )

            [TrackTitle] =&gt; junoon1111
            [obj_UsersVO] =&gt; stdClass Object
                (
                    [firstname] =&gt; Blake
                    [lastname] =&gt; Addison
                )

            [obj_CommonVO] =&gt; stdClass Object
                (
                    [UserName] =&gt; Addison Blake
                    [Play] =&gt; No
                )

        )</description>
		<content:encoded><![CDATA[<p>Greate,<br />
I really appreiciate the Peter work and Chetan suggetion of improvement in the code snippet.<br />
I have a query in this respect. I am getting data in following format. How can I display the select box using the arrVisibility array and selected option value using Visibility element value. And also how can I display he other objects value like obj_UsersVO] =&gt; stdClass Object and [obj_CommonVO] =&gt; stdClass Object in the data grid.<br />
Can you please help me as I am new to flex.</p>
<p>[0] =&gt; FeedbackVO Object<br />
        (<br />
            [IdFeedback] =&gt; 1<br />
            [FeedbackType] =&gt; A<br />
            [TrackId] =&gt; 1<br />
            [Rating] =&gt; 1<br />
            [Visibility] =&gt; V<br />
            [CreatedOn] =&gt; 2008-01-01 00:00:00<br />
            [CreatedBy] =&gt; 35<br />
            [Comments] =&gt; 1111<br />
            [UserId] =&gt; 1<br />
            [arrVisibility] =&gt; Array<br />
                (<br />
                    [V] =&gt; Visible<br />
                    [H] =&gt; Hidden<br />
                    [F] =&gt; Featured<br />
                )</p>
<p>            [TrackTitle] =&gt; junoon1111<br />
            [obj_UsersVO] =&gt; stdClass Object<br />
                (<br />
                    [firstname] =&gt; Scott<br />
                    [lastname] =&gt; Tiger<br />
                )</p>
<p>            [obj_CommonVO] =&gt; stdClass Object<br />
                (<br />
                    [UserName] =&gt; Tiger Scott<br />
                    [Play] =&gt; Yes<br />
                )</p>
<p>        )</p>
<p>    [1] =&gt; FeedbackVO Object<br />
        (<br />
            [IdFeedback] =&gt; 2<br />
            [FeedbackType] =&gt; A<br />
            [TrackId] =&gt; 1<br />
            [PromoId] =&gt; 1<br />
            [Rating] =&gt; 1<br />
            [Supporting] =&gt; Y<br />
            [Visibility] =&gt; V<br />
            [CreatedOn] =&gt; 2008-01-01 00:00:00<br />
            [CreatedBy] =&gt; 35<br />
            [Comments] =&gt; 2222<br />
            [UpdatedOn] =&gt; 2008-01-01 00:00:00<br />
            [UpdatedBy] =&gt; 2<br />
            [UserId] =&gt; 2<br />
            [FeedbackArray] =&gt;<br />
            [userRecord] =&gt;<br />
            [commonRecord] =&gt;<br />
            [arrVisibility] =&gt; Array<br />
                (<br />
                    [V] =&gt; Visible<br />
                    [H] =&gt; Hidden<br />
                    [F] =&gt; Featured<br />
                )</p>
<p>            [TrackTitle] =&gt; junoon1111<br />
            [obj_UsersVO] =&gt; stdClass Object<br />
                (<br />
                    [firstname] =&gt; Blake<br />
                    [lastname] =&gt; Addison<br />
                )</p>
<p>            [obj_CommonVO] =&gt; stdClass Object<br />
                (<br />
                    [UserName] =&gt; Addison Blake<br />
                    [Play] =&gt; No<br />
                )</p>
<p>        )</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peterd</title>
		<link>http://blog.flexexamples.com/2008/03/26/converting-an-array-of-string-objects-to-an-array-of-object-objects-in-flex/comment-page-1/#comment-2964</link>
		<dc:creator>peterd</dc:creator>
		<pubDate>Fri, 28 Mar 2008 14:18:33 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/03/26/converting-an-array-of-string-objects-to-an-array-of-object-objects-in-flex/#comment-2964</guid>
		<description>Chetan,

Fantastic suggestion! I never even thought about trying that. I&#039;ll update the article with the new (and better) technique.

But in the meantime, here is my revised &lt;mx:Script /&gt; block, snippet style:
&lt;pre class=&quot;code&quot;&gt;
private var arrayOfString:Array;
private var arrayOfObject:Array;

private function init():void {
    arrayOfString = [&quot;test&quot;, &quot;test&quot;, &quot;fork&quot;, &quot;test&quot;];
    arrayOfObject = arrayOfString.map(toObject);
}

private function toObject(element:String, index:int, arr:Array):Object {
    return {label: element};
}
&lt;/pre&gt;

Again, huge thanks!

Peter</description>
		<content:encoded><![CDATA[<p>Chetan,</p>
<p>Fantastic suggestion! I never even thought about trying that. I&#8217;ll update the article with the new (and better) technique.</p>
<p>But in the meantime, here is my revised &lt;mx:Script /&gt; block, snippet style:</p>
<pre class="code">
private var arrayOfString:Array;
private var arrayOfObject:Array;

private function init():void {
    arrayOfString = ["test", "test", "fork", "test"];
    arrayOfObject = arrayOfString.map(toObject);
}

private function toObject(element:String, index:int, arr:Array):Object {
    return {label: element};
}
</pre>
<p>Again, huge thanks!</p>
<p>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chetan</title>
		<link>http://blog.flexexamples.com/2008/03/26/converting-an-array-of-string-objects-to-an-array-of-object-objects-in-flex/comment-page-1/#comment-2963</link>
		<dc:creator>Chetan</dc:creator>
		<pubDate>Fri, 28 Mar 2008 14:07:42 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/03/26/converting-an-array-of-string-objects-to-an-array-of-object-objects-in-flex/#comment-2963</guid>
		<description>Suggestion: You can also use Array.map() instead of looping to make it (slightly) more readable.</description>
		<content:encoded><![CDATA[<p>Suggestion: You can also use Array.map() instead of looping to make it (slightly) more readable.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
