title: Convert Object to Array in Redux
body: <p>Hi I have a redux state as an object</p>
  
  <pre><code> const state= {
      posts: {
          byId:{
              "8xf0y6ziyjabvozdd253nd":{
                  id: '8xf0y6ziyjabvozdd253nd',
                  timestamp: 1467166872634,
                  title: 'Udacity is the best place to learn React',
                  body: 'Everyone says so after all.',
                  author: 'thingtwo',
                  category: 'react',
                  voteScore: 6,
                  deleted: false,
                  commentCount: 2,
                  comments: ["894tuq4ut84ut8v4t8wun89g", "8tu4bsun805n8un48ve89"]
              },
              "6ni6ok3ym7mf1p33lnez":{
                  id: '6ni6ok3ym7mf1p33lnez',
                  timestamp: 1468479767190,
                  title: 'Learn Redux in 10 minutes!',
                  body: 'Just kidding. It takes more than 10 minutes to learn technology.',
                  author: 'thingone',
                  category: 'redux',
                  voteScore: -5,
                  deleted: false,
                  commentCount: 0,
                  comments:[]
              }
          },
          allIds:["8xf0y6ziyjabvozdd253nd","6ni6ok3ym7mf1p33lnez"]
      }
  
    }
  </code></pre>
  
  <p>I want it to convert it to an Array so I can use it in React. It should look like</p>
  
  <pre><code>posts: [
  
      {
          id: '8xf0y6ziyjabvozdd253nd',
              timestamp: 1467166872634,
              title: 'Udacity is the best place to learn React',
              body: 'Everyone says so after all.',
              author: 'thingtwo',
              category: 'react',
              voteScore: 6,
              deleted: false,
              commentCount: 2,
              comments: ["894tuq4ut84ut8v4t8wun89g", "8tu4bsun805n8un48ve89"]
      },
      {
          id: '6ni6ok3ym7mf1p33lnez',
              timestamp: 1468479767190,
              title: 'Learn Redux in 10 minutes!',
              body: 'Just kidding. It takes more than 10 minutes to learn technology.',
              author: 'thingone',
              category: 'redux',
              voteScore: -5,
              deleted: false,
              commentCount: 0,
              comments:[]
      }
  ]
  </code></pre>
  
  <p>How do it? My Try that does not work</p>
  
  <pre><code>        const postsList = state.posts.byId.map(post=&gt;(
  
          {
              id: post.id,
              timestamp: post.timestamp,
              title: post.title,
              body: post.body,
              author: post.author,
              category: post.category,
              voteScore: post.voteScore,
              deleted: post.deleted,
              commentCount:post.commentCount,
              comments: post.comments.map(id=&gt;id)
          // }
      ))
  </code></pre>
  
  <p>Another try that does not work</p>
  
  <pre><code>const postOrder = state.posts.allIds
      const a = {posts:postOrder.map((post)=&gt;(
              {
                  post,
                  Object.keys(state.posts.byId.reduce(()=&gt;{
  
                  }))
              }
          ))}
  </code></pre>
  
  <p>Now I have tried searching the internet I have seen some people using loaddash library, and some even using the reduce method  but since </p>
  
  <blockquote>
    <p>I am not a javascript developer</p>
  </blockquote>
  
  <p>, this is all tough for me. I am a python developer by trade</p>