Question: hello everyone i have the following function:

```
function Entfernung(v_stadt  Rheinlandstädte%rowtype) 
Return Abstandstabelle is

tabelle ABSTANDSTABELLE;

cursor c_städte IS
Select *
 From Rheinlandstädte
 ;
v_andereStadt  Rheinlandstädte%rowtype;
v_entfernung float;

begin

Open c_städte;

  LOOP

  fetch c_städte into v_andereStadt;
  v_entfernung := Abstand(v_stadt, v_andereStadt);
  tabelle(v_andereStadt.stadtname) := v_entfernung;
  exit when c_städte%NOTFOUND;
END Loop;
close c_städte;
return tabelle;
end Entfernung;

```

how can i call this function in oracle. The parameter is rowtype and I cant't use SELECT function from DUAL;

Answer: 
It looks like the problem stems from the selectors in this snippet:

```
  $('#ebook').append('<ul>'); // Append new list sets
  $('#ebook ul').append('<li><a href="#" data-id="' + item.product_id + '" data-type="' + item.type + '">' + item.title + '</a></li>');

```

The selector "$('#ebook ul')" won't select the newly added ul in the iteration, instead it'll append to the first match (so the first ul added to the #ebook div). Instead, try chaining your calls like so:

```
/* EBOOKS*/
$.each(booksobj.set, function(i, item) {
     $('#ebook').append('<ul>').append('<li><a href="#" data-id="' + item.product_id + '" data-type="' + item.type + '">' + item.title + '</a></li>');
});

```

Working example with JSON data in a variable: <http://codepen.io/JasonGraham/pen/WxbvRo>
Your problem is use $('#ebook ul'), another question, why you use the key "set" two times? No make sense, 

```
var data = {
"ebooks": {
    "basic": [
        [
            {
                "title": "PDF Sample 1",
                "product_id": 1,
                "type": "ebook"
            },
            {
                "title": "PDF Sample 2",
                "product_id": 2,
                "type": "ebook"
            },
        ],
        [
            {
                "title": "PDF Sample 3",
                "product_id": 1,
                "type": "ebook"
            },
            {
                "title": "PDF Sample 4",
                "product_id": 2,
                "type": "ebook"
            },
        ]
    ]
}
}

$.each(data.ebooks.basic, function(i, item) {
    $('#ebook').append('<ul>'); // Append new list sets
    $.each(item, function(i, item2) {
    $('#ebook ul:last').append('<li><a href="#" data-id="' + item2.product_id + '" data-type="' + item2.type + '">' + item2.title + '</a></li>');
});
});

```

see the [fiddle](https://jsfiddle.net/efo0ug73/1/)