title: How to sort nested JSON field in sequelize
body: <p>I'm trying to order <code>TabsTemplate</code> model based on the <code>sequence</code> field however, ordering is not working.</p>
  
  <p><strong>Routes</strong></p>
  
  <pre><code>/* Get Manufacturer Tabs List */
  router.get('/', function(req, res) {
    var manufacturer_id = req.params.manufacturer_id;
    models.Manufacturer.findAll({
      where: {
        id: manufacturer_id
      },
      include: [{
          model: models.TabsTemplate,
          order: [[models.sequelize.json("ManufacturerTab.sequence"), 'DESC']]
      }]
    }).  
    then(function(manufacturer_tabs) {  
        res.status(200).json(manufacturer_tabs);  
    }, function(error) {  
        res.status(500).send(error);  
    });  
  });
  </code></pre>
  
  <p><strong>Data</strong></p>
  
  <pre><code>[
      {
          "id": 1,
          "manufacturer_name": "Brand",
          "manufacturer_logo_url": "/assets/img/brand-logo.jpg",
          "manufacturer_archived_status": false,
          "createdAt": "2018-12-06T15:06:01.703Z",
          "updatedAt": "2018-12-06T15:06:01.703Z",
          "TabsTemplates": [
              {
                  "id": 1,
                  "tab_name": "Tab 1",
                  "createdAt": "2018-12-06T15:06:01.684Z",
                  "updatedAt": "2018-12-06T15:06:01.684Z",
                  "ManufacturerTab": {
                      "manufacturerId": 1,
                      "tabsTemplateId": 1,
                      "sequence": 2,
                      "createdAt": "2018-12-06T15:06:01.707Z",
                      "updatedAt": "2018-12-06T15:06:01.707Z"
                  }
              },
              {
                  "id": 2,
                  "tab_name": "Tab 2",
                  "createdAt": "2018-12-06T15:06:01.684Z",
                  "updatedAt": "2018-12-06T15:06:01.684Z",
                  "ManufacturerTab": {
                      "manufacturerId": 1,
                      "tabsTemplateId": 2,
                      "sequence": 1,
                      "createdAt": "2018-12-06T15:06:01.707Z",
                      "updatedAt": "2018-12-06T15:06:01.707Z"
                  }
              },
              {
                  "id": 3,
                  "tab_name": "Tab 3",
                  "createdAt": "2018-12-06T15:06:01.684Z",
                  "updatedAt": "2018-12-06T15:06:01.684Z",
                  "ManufacturerTab": {
                      "manufacturerId": 1,
                      "tabsTemplateId": 3,
                      "sequence": 3,
                      "createdAt": "2018-12-06T15:06:01.707Z",
                      "updatedAt": "2018-12-06T15:06:01.707Z"
                  }
              },
              {
                  "id": 4,
                  "tab_name": "Tab 4",
                  "createdAt": "2018-12-06T15:06:01.684Z",
                  "updatedAt": "2018-12-06T15:06:01.684Z",
                  "ManufacturerTab": {
                      "manufacturerId": 1,
                      "tabsTemplateId": 4,
                      "sequence": 4,
                      "createdAt": "2018-12-06T15:06:01.707Z",
                      "updatedAt": "2018-12-06T15:06:01.707Z"
                  }
              }
          ]
      }
  ]
  </code></pre>