title: How to Shuffle two Objects in javascript which has an Id and value in it
body: <p>Well i been doing some research on it i have one Object in javascript and i have made copy of it i have to shuffle both the objects data's. I dont want both the objects in same order.</p>
  
  <p>I need to shuffle it.</p>
  
  <p>I have shuffled it in different manner using another array with having only id, same id in it as in testArra,that way i have made an array which does not have these id but has id which starts from 0. 
  Please help me with this. </p>
  
  <p>the method i have used was : -</p>
  
  <pre><code>var testIndexshuffleData = testShuffle(indexNumberOne);
  function testShuffle(arra1){
      for (var i = 0; i &lt; arra1.length - 1; i++) {
          var j = i + Math.floor(Math.random() * (arra1.length - i));
  
          var temp = arra1[j];
          arra1[j] = arra1[i];
          arra1[i] = temp;
      }
      return arra1;
  }
  
  var newArray = shuffleArraytest(testArray,testIndexshuffleData);
  function shuffleArraytest(arrayOneName,arrayTwoIndex){
      var newTextArray = [];
          var arrayTwoIndexLength = arraytwoIndex.length;
          console.info("length of an array : "+arrayTwoIndexLength);
          for(let i = 0; i &lt; arrayTwoIndexLength;i++){
              var indexSave = arraytwoIndex[i];   
              var arrayOneNameSingleIndex = arrayOneName[indexSave];
              newTextArray.push(arrayOneNameSingleIndex);
  
          }
  
      return newTextArray;
  }
  
  var testArray = ({
          30 : 'hello everyone',
          31 : 'i hope',
          32 : 'you all,
          33 : 'are',
          34 : 'fine',
      });
  var testArrayTwo = testArray;
  </code></pre>
  
  <p>it should shuffle in any manner like.
  33:'you all',31:'i hope',34:'fine',30:'hello everyone',32:'you all'</p>