I have a little doubt.
I’m trying to get a specific json id.
But I can not.
can you help me?
Type:
When there is a query in the database, I use it like this:
testes = Teste
|> order_by([c], asc: c.id)
|> where([c], c.user_id == ^user_id)
|> Ecto.Query.preload(:user)
|> Repo.all
And in json, without any query in the database, how do I do it?
[
%{
command: "test",
created: 1584399425,
hostconfig: %{networkmode: "test"},
id: "test",
image: "test",
imageid: "test",
labels: %{
addressweb: "testsdad",
user_id: 1
},
mounts: [],
names: ["/test"],
networksettings: %{
networks: %{
test_default: %{
aliases: nil,
driveropts: nil,
endpointid: "test",
gateway: "test",
globalipv6address: "",
globalipv6prefixlen: 0,
ipaddress: "test",
ipamconfig: nil,
ipprefixlen: 16,
ipv6gateway: "",
links: nil,
macaddress: "test",
networkid: "test"
}
}
},
ports: [%{privateport: 80, type: "tcp"}],
state: "test",
status: "test"
}
]