s-yadav / jsonQ

A JavaScript library to make manipulation and extraction of data from a JSON very easy and fast.
MIT License
202 stars 69 forks source link

ReferenceError: jsonQ is not defined #18

Closed davidnewcomb closed 6 years ago

davidnewcomb commented 6 years ago

According to your documentation this should work, but I just get ReferenceError: jsonQ is not defined. What do I need to add so I can use it?

<html>
<head>
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<script src="https://raw.githubusercontent.com/s-yadav/jsonQ/master/jsonQ.min.js"></script>
</head>
<body>
<script>
alert('script');
$(document).ready(function () {
    alert('ready');
    var jsonObj = { "name": "David"};
    var name = jsonQ(jsonObj).find("name").value();
    alert('working-name='+name);
}
);
</script>
</body>
</html>
s-yadav commented 6 years ago

This is a bundling issue. I will fix this.

davidnewcomb commented 6 years ago

Is this coming soon?

s-yadav commented 6 years ago

Ohh sorry I didn't saw the initial comments properly and thought I had made some changes on build for this package which was the case for some other package.

There is nothing wrong on the build. The url you are using jsonQ is incorrect. That url has plain/text mime type. Use this url insteadhttps://cdn.rawgit.com/s-yadav/jsonQ/master/jsonQ.min.js