Re: [nodejs] teach me JSON

2014-01-19 Thread Jyoti Chhetri
Below is corrected json. in node, I just want to be able to send onwardTrips.tripId even something as simple as this, not being rendered in the view. server.js getTrips: function getTrips(req, res, next){ var url = 'http://ec2-54-251-114-65.ap-southeast-1.compute.amazonaws.com:8080/CTB-

[nodejs] teach me JSON

2014-01-19 Thread Jyoti Chhetri
I have following json. At first I need to get the tripId, fromCity, toCity. Then based on tripId I need to get pickupPointDetails and dropoffPointDetails. Please help me do this, I m very new to json and node js and I need to get this done and its already taken so long and still i havent found

Re: [nodejs] how to read multidimentional JSON sent from restful api?

2014-01-19 Thread Jyoti Chhetri
> > HI I have received the following json. Now i want to iterate it and send it to the view. I need tripId ickupPointDetails object ropoffPointDetails object since they are at different levels i dont know how to segment them and send it to view. {"onwardTrips":[{"tripId":"1284876","fro

[nodejs] how to Retrieving all the keys in a nested json in nodejs?

2014-01-19 Thread Jyoti Chhetri
HI i have following complex objects no i need to map it accordingly so that i can display it in the view. please help me solve this. i'm able to get the following in the view but haven't been able to get tripId, pickupPoinId. I want to send it separately so that i can render in view easily.

[nodejs] how to read multidimentional JSON sent from restful api?

2014-01-19 Thread Jyoti Chhetri
HI can anyone help me use this json sent from rest api, i have gotten the json but i dont know how to use it and send it to view. { "onwardTrips": [ { "tripId": "1285702", "fromCity": "Singapore", "busType": "Executive", "pickupPointDetails": [ {

Re: [nodejs] unable to catch data sent from server in ajx and load it in view

2014-01-17 Thread Jyoti Chhetri
HI i have made the changes but still dont seem to find the solution.Below are the changed codes, looks like server is not sending response to the ajax call. server.js getDestinationCities: function getDestinationCities(req, res, next){ console.log('source city id ' + req.body.selectsour

Re: [nodejs] unable to catch data sent from server in ajx and load it in view

2014-01-17 Thread Jyoti Chhetri
hi ravi, sorry that's exactly i dont want to do. I just want to populate the sever sent json in a select option. How can I do it, just pasted some code from web thinking i might achieve it. in the console, it keeps pending for server response. -- -- Job Board: http://jobs.nodejs.org/ Postin

[nodejs] unable to catch data sent from server in ajx and load it in view

2014-01-17 Thread Jyoti Chhetri
I'm trying to fetch json from ajax request from server and send it back to view on selct option change. Please help me with this. I'm not able to retrieve json sent from server. Ihave been stuck in this for really really long. Please help me clean the code, i'm very new to jquery view.jade

[nodejs] ajax call not posting form data to server

2014-01-17 Thread Jyoti Chhetri
i need to make ajax call on option change of for first select value and display second select option based on the value select from first select option and update second select option with json value sent from server. .jade file form.form-horizontal(id="createDealForm", accept-charset="UTF-8",

[nodejs] Re: how to read json array

2014-01-17 Thread Jyoti Chhetri
Thank you very much , it worked. -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to nodejs

[nodejs] how to read json array

2014-01-16 Thread Jyoti Chhetri
API rest is sending following json, I'm not being able to read it, I need to match ID as seen below say 95 for which array of city needs to be shown. Please help me do it. '95': [ { cityId: 78, cityName: 'Kuala Kangsar' }, { cityId: 94, cityName: 'Tanjung Malim' }, { cityId: 1, cit

[nodejs] how to get object using nodejs from cypher query?

2013-08-17 Thread Jyoti Chhetri
I have following query which is giving me what I want 'START user=node({userId}), other=node({otherId})', 'MATCH (user) -[rels?]-> (other)', 'RETURN rels' but I'm unable to access the object it send.I need following high lightened object which I have no idea to access.Object is inspe

[nodejs] profile view 404

2013-08-11 Thread Jyoti Chhetri
Following codes doesnt render view.Please help thanks! probably mistakes with callbacks routes handleRequest url set in another file. http request is profile = require(routes/profile.js); app.get(/profile/:uid, profile.handelRequest) *routes/profile.js* function handleRequest(req, res, next)

[nodejs] Re: return relation between two nodes neo4j graph database is sending null as relation?

2013-08-07 Thread Jyoti Chhetri
User.relsCheck(usernodes, function (err, rels) { if (!err && rels) { console.log('relationship ' + JSON.stringify(rels)); callback(null, new rels); } else { callback(err || new Error('friend request exists')); } }); User.relsCheck = func

[nodejs] return relation between two nodes neo4j graph database is sending null as relation?

2013-08-07 Thread Jyoti Chhetri
Here is I have done, but I'm getting {rel : null} for everyuser. I just want to return relationship between two nodes if it exists which are two users. User.checkRelationship = function (user, fid, callback) { var uids = [user.uid, fid]; async.map(uids, User.by_uid, function (err, usernode

[nodejs] google-api-nodejs-client, how to get contacts from google accounts?

2013-06-09 Thread Jyoti Chhetri
I'm working on an application which requires me to connect to a google account and extract contact address from that email account.I would be more than glad to know the process . I'm trying to do this using google-api-nodejs-client but cannot find detailed documents on its usage also note that