I want send two arrays $scope.candidates and $scope.managers as POST to some PHP which I will code for the server. I strongly prefer a JSON interface, and thought to combine them into a single JSON object.
var JsonString = {'candiates' : JSON.stringify($scope.candidates),
'managers' : JSON.stringify($scope.managers)
};
Does not generate valid JSON. How do I achieve what I want?