title: Mongodb sorting by one column with multiple values
body: <p>I am using node.js Express, mongo-db database I'am stuck in following problem!!!</p>
  <p>In database, post collection have one column named <strong>&quot;seen_by&quot;</strong> ,its type is array.<br />
  If user have seen that post , the &quot;seen_by&quot; array  would contain it's user_id.<br />
  Now I have to get data in post collection, list down user's unseen posts following seen posts.</p>
  <p>Now My question is how to sort one cloumn by two diffrent values in mongodb</p>
  <p>Example:</p>
  <ol>
  <li>post_id :10, name: test, post_date :10/14/2020, Seen_by: Array, 0: 10,</li>
  <li>post_id :11, name: test1, post_date :10/15/2020, Seen_by: Array, 0: 10,</li>
  <li>post_id :15, name: tabf, post_date :09/14/2020, Seen_by: Array, 0: 1,</li>
  <li>post_id :20, name: userTest, post_date :10/14/2020, Seen_by: Array, 0: 10</li>
  </ol>
  <p>If now login user id Is 1 then Output should like this:
  1)Post_id :10,....
  2)post_id:11,....
  3)post_id :20,...
  4)post_id:15,...</p>
  <p>How to get above response in Mongo-db ??</p>