Tagged Questions
2
votes
6answers
44 views
parse a string in javascript by a common delimiter
In javascript I have a string of the form "/john/smith". I'd like to get the array "first-name" : "john", "last-name" : "smith".
Does js have some easy function to parse this string based on a ...
0
votes
2answers
28 views
Replace windows carriage returns in Javascript
I have a text file that I'm trying to parse into an array in Javascript.
The fields are delimited by a double carat ('^^') and lines are terminated by a newline ('\n')
One of the fields is a free ...
1
vote
1answer
35 views
AngularJS/Parse $http --data-urlencode
I need to retrieve a specific data using AngularJS's $http calling Parse RESTFUL API, the only way Parse allows me to do it is to send in a "--data-urlencode where={"storeId":2}" into a curl call.
...
1
vote
1answer
298 views
Slice a JSON string
I have fetched data from MySQL and echoed JSON encoded data as follows:
$result = mysql_query ("SELECT * FROM order_list");
$myjsons = array();
$i = 0;
while ($row = mysql_fetch_assoc($result)) {
...
0
votes
1answer
27 views
please explain this javascript debugger output regarding Date constructor
I am trying to instantiate a date so that the code works in Chrome and IE (et al). Ideally I'd like to find a simple statement rather than a UDF, if it's possible. Is it not possible to Date.parse the ...
2
votes
0answers
15 views
Need parser for Javascript (used in Java app) to get basic property value information about Ext.define objects
I have hundreds of small javascript files that follow the following format where Ext.define defines a javascript class. I need to be able to parse these files in a Java app and get the "SOMECLASSNAME" ...
0
votes
2answers
21 views
splicing an element IN a JSON list- javascript
I have the following line being printed on my screen:
Would you like to pay €xx to POS_ID Latte X 1....€2.50-Salad X 1....€4.00-Wrap X 1....€4.50-Coffee X 2....€3.00-
What I want is for it to ...
1
vote
3answers
112 views
Regex with a large amount of “or's”
Writing some regex to help process street addresses. However, I'm unsure if regex is the correct way to go about solving this problem.
I have a street address that looks like this:
7829 Hollywood ...
1
vote
2answers
59 views
Reading XML with Javascript
I am reading a XML file through SpineTix which is built on Javascript. I've created a custom parser for this.
This is the XML structure
<ArlandaExpress>
<info>
<updated ...
-1
votes
4answers
49 views
How can I get “h” value from the link using javascript? [closed]
How can I get "h" value from the url using javascript? (ajax,jquery or etc.)
URL: http://www.youtube-mp3.org/a/itemInfo/?video_id=p8-pP4VboBk
URL Content:
info = { "title" : "Laura Branigan - Self ...
0
votes
1answer
30 views
How to parse getJSON correctly?
I want to parse latitude, longitude and time from a file in json format.
In file the data is saved like this:
[{"lat": 55.7997016667, "long": 15.97143, "time": "2013-06-14 12:50:40"}, {"lat": ...
-2
votes
1answer
59 views
How to get part of source code from url, using javascript?
For example our url: example.com
and source code is:
<html>
<head>
<body>
Hello My Name is: Jane
</body>
</head>
</html>
My question is: How we can get only ...
0
votes
0answers
44 views
simple html dom php script
I have this task to scrape info from a website. I have this code that scrape the title of the company. But the other details are in the javascript that when you click the title the other infos will ...
12
votes
3answers
5k views
JavaScript YAML Parser
I am looking for a JavaScript YAML parser which converts the YAML into something usable within a HTML page. I've tried this version on Github (https://github.com/visionmedia/js-yaml) but it looks like ...
0
votes
2answers
58 views
console saying my array is undefined javascript
I've looked at many examples and I can't seem to figure out what I'm doing wrong here:
var names_Array = [];
var names_List = new WinJS.Binding.List(names_Array);
names_List.push({ name: "Joe ...