Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- a = %{
- lead: %{
- id: nil,
- selections: [
- %{
- type: "lead_type",
- name: "lt",
- options: [
- %{
- "name": "white_glove",
- "value": "wg"
- },
- %{
- "name": "direct",
- "value": "dir"
- },
- %{
- "name": "valuation_office",
- "value": "vo"
- }
- ]
- }
- ]
- }
- }
- IO.puts "A"
- IO.inspect a
- b = %{
- lead: %{
- id: nil
- }
- }
- IO.puts "B"
- IO.inspect b
- selections = [
- %{
- type: "lead_type",
- name: "lt",
- options: [
- %{
- "name": "white_glove",
- "value": "wg"
- },
- %{
- "name": "direct",
- "value": "dir"
- },
- %{
- "name": "valuation_office",
- "value": "vo"
- }
- ]
- }
- ]
- IO.puts ""
- b = Map.put(b.lead, :selections, selections)
- #put_in(b, [:selections], selection)
- # lead = Map.put_new(b.lead, :selections, selections)
- IO.puts "NEW B"
- IO.inspect b
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement