-1
에서 배열에 저장 데이터 :다음과 같이 나는 형식으로 JSON 파일이 어떻게 JSON
@recipe = new JS.M.Recipe()
@recipe.fetch(@recipe.getRecipeType())
@recipeTypes = @recipe.getRecipeType()//Here data is getting as objetcs..if i use alert to print this. It showing output like "[object Object]"..
내가 데이터를 저장할 :
{
"recipe_type": [
"vegetarian",
"non-vegetarian"
],
"recipe_times": [
"<30min",
"30-60min",
"60-90min"
],
"recipe_cuisines": [
"arabian",
"european",
"Indian",
"chinese"
]
}
나는 별도의 배열에 각 목록을 저장해야
@recipe_type = @recipeTypes.get("recipe_type")
@recipe_times = @recipeTypes.get("recipe_times")//This is wrong
내가 원하는 것을 어떻게 얻을 수 있습니까?