Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

merge json files on phoenix render framework

def render("event_all.json", %{event: event}) do
     render("event.json", %{event: event})
     |> Map.put_new(:activities, render_many(event.activities, Project.ActivityView, "activity.json", as: :activity))
end
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #merge #json #files #phoenix #render #framework
ADD COMMENT
Topic
Name
9+4 =