Virtual list won't show my JSON-Data

Unfortunately I can’t get this to work. The data should be read from the JSON file and displayed in the virtual list.

What am I doing wrong?

{“abk”: “aaa”,“name”: “This is aaa”},
{“abk”: “bbb”,“name”: “This is bbb”},
{“abk”: “ccc”,“name”: “This is ccc”},


  .then(function (res) {

  	var items=res.length;
  	var self = this;
  	var items = [];
  	for (var i = 0; i <= data.length-1; i++) {
  		abk: data[i][1],
  		name: data[i][0]


  el: '.virtual-list',
  height: 44,
  createUl: true,
  items: items,

  //items: [{"abk": "aaaa","name": "This is aaaa"},{"abk": "bbbbb","name": "This is bbbb"},{"abk": "cccc","name": "This is cccc"}],

renderItem(item) {
  return `
    <a href="#" class="item-link item-content">
      <div class="item-inner">
        <div class="item-title-row">
          <div class="item-title">${item.abk}</div>
        <div class="item-subtitle">${}</div>



You two items var maybe you are overwriting.

var items=res.length;
var self = this;
var items = []; --> change this one ir the first.

I can’t test.

I tried it but this won’t work.

Can anyone help me? I just can’t get any further at this point

You make a console.log in the for to see what is happening in there.

Can you please give me a simple example from scratch?
That would help me a lot, I can customize it myself.

This is what the example should show:

  • Read JSON file
  • Parse content
  • Display content in virtual list

Here is something working for me,. I use the WordPress rest api to get the JSON.

app.request.json('JSON_URL', function (usadosdata) {
    $$(document).on('page:init', '.page[data-name="oportunidades"]', function (e) {
        var usados = usadosdata;
        var objusados = [];
        for (var i = 0; i < usados.length; i++) {
            var tit = usados[i]["title"];
            var desc = usados[i]["acf"];
            var t = {};
   = i + 1;
            t.titulo = tit["rendered"];
            t.descripcion = desc["descripcion_usados"];
        var oportunidadesList = app.virtualList.create({
            // List Element
            el: '.oportunidades_list',
            // Pass array with items
            items: objusados,
            emptyTemplate: 'TEMPLATE_WHEN_IS_EMPTY',
            // Custom search function for searchbar
            searchAll: function (query, items) {
                var found = [];
                for (var i = 0; i < items.length; i++) {
                    if (items[i].titulo.toLowerCase().indexOf(query.toLowerCase()) >= 0 || query.trim() === '') found.push(i);
                return found; //return array with mathced indexes
            // List item Template7 template
            itemTemplate: 'HERE_GO_THE_THEMPLATE',
            // Item height
            height: 102,