Remove console.log, also pass constraint parameter as json String and

not json object.