ming %!s(int64=4) %!d(string=hai) anos
pai
achega
f858bd464f
Modificáronse 1 ficheiros con 5 adicións e 1 borrados
  1. 5 1
      index2.html

+ 5 - 1
index2.html

@@ -133,7 +133,11 @@
       document.getElementById("mySidenav").style.width = "0";
     }
     function load_data(id){
-      alert(id);
+      var filtered = collection.filter(function (item) {
+        return item.id === id;
+      });
+      alert(filtered.title);
+
     }
     </script>
   <style>