This is my project list, I need ids of project from this list and want to store it in list. Then I want to check the project id if it is in list in query. Can anyone guide?
[
%Appeo.Leads.Project{
__meta__: #Ecto.Schema.Metadata<:loaded, "projects">,
activities: #Ecto.Association.NotLoaded<association :activities is not loaded>,
appointments: #Ecto.Association.NotLoaded<association :appointments is not loaded>,
buildings: #Ecto.Association.NotLoaded<association :buildings is not loaded>,
comments: #Ecto.Association.NotLoaded<association :comments is not loaded>,
company: #Ecto.Association.NotLoaded<association :company is not loaded>,
company_contact: #Ecto.Association.NotLoaded<association :company_contact is not loaded>,
company_contact_id: 12,
company_id: 2,
contacts: #Ecto.Association.NotLoaded<association :contacts is not loaded>,
description: "Debitis quis eligend",
estimated_time: 88,
id: 14,
index: 1.0,
inserted_at: ~N[2022-06-10 09:37:45],
lead_column: #Ecto.Association.NotLoaded<association :lead_column is not loaded>,
lead_column_id: 6,
name: "Bryar Flores",
project_buildings: #Ecto.Association.NotLoaded<association :project_buildings is not loaded>,
project_contacts: #Ecto.Association.NotLoaded<association :project_contacts is not loaded>,
project_image: nil,
project_materials: #Ecto.Association.NotLoaded<association :project_materials is not loaded>,
project_permission_joined_users: #Ecto.Association.NotLoaded<association :project_permission_joined_users is not loaded>,
project_stage: nil,
project_start_date: ~U[1970-08-10 20:25:00Z],
project_type: "roofing",
status: :active,
tasks: #Ecto.Association.NotLoaded<association :tasks is not loaded>,
updated_at: ~N[2022-06-10 09:37:45]
},
%Appeo.Leads.Project{
__meta__: #Ecto.Schema.Metadata<:loaded, "projects">,
activities: #Ecto.Association.NotLoaded<association :activities is not loaded>,
appointments: #Ecto.Association.NotLoaded<association :appointments is not loaded>,
buildings: #Ecto.Association.NotLoaded<association :buildings is not loaded>,
comments: #Ecto.Association.NotLoaded<association :comments is not loaded>,
company: #Ecto.Association.NotLoaded<association :company is not loaded>,
company_contact: #Ecto.Association.NotLoaded<association :company_contact is not loaded>,
company_contact_id: 3,
company_id: 2,
contacts: #Ecto.Association.NotLoaded<association :contacts is not loaded>,
description: "Ipsa vero dolore la",
estimated_time: 85,
id: 15,
index: 1.0,
inserted_at: ~N[2022-06-10 09:39:23],
lead_column: #Ecto.Association.NotLoaded<association :lead_column is not loaded>,
lead_column_id: 7,
name: "Keelie Coffey",
project_buildings: #Ecto.Association.NotLoaded<association :project_buildings is not loaded>,
project_contacts: #Ecto.Association.NotLoaded<association :project_contacts is not loaded>,
project_image: nil,
project_materials: #Ecto.Association.NotLoaded<association :project_materials is not loaded>,
project_permission_joined_users: #Ecto.Association.NotLoaded<association :project_permission_joined_users is not loaded>,
project_stage: nil,
project_start_date: ~U[1986-08-22 17:27:00Z],
project_type: "any name",
status: :active,
tasks: #Ecto.Association.NotLoaded<association :tasks is not loaded>,
updated_at: ~N[2022-06-10 09:39:23]
},
%Appeo.Leads.Project{
__meta__: #Ecto.Schema.Metadata<:loaded, "projects">,
activities: #Ecto.Association.NotLoaded<association :activities is not loaded>,
appointments: #Ecto.Association.NotLoaded<association :appointments is not loaded>,
buildings: #Ecto.Association.NotLoaded<association :buildings is not loaded>,
comments: #Ecto.Association.NotLoaded<association :comments is not loaded>,
company: #Ecto.Association.NotLoaded<association :company is not loaded>,
company_contact: #Ecto.Association.NotLoaded<association :company_contact is not loaded>,
company_contact_id: 12,
company_id: 2,
contacts: #Ecto.Association.NotLoaded<association :contacts is not loaded>,
description: "Quia veniam ut erro",
estimated_time: 37,
id: 16,
index: 1.0,
inserted_at: ~N[2022-06-13 06:35:00],
lead_column: #Ecto.Association.NotLoaded<association :lead_column is not loaded>,
lead_column_id: 5,
name: "Shannon Wynn",
project_buildings: #Ecto.Association.NotLoaded<association :project_buildings is not loaded>,
project_contacts: #Ecto.Association.NotLoaded<association :project_contacts is not loaded>,
project_image: nil,
project_materials: #Ecto.Association.NotLoaded<association :project_materials is not loaded>,
project_permission_joined_users: #Ecto.Association.NotLoaded<association :project_permission_joined_users is not loaded>,
project_stage: nil,
project_start_date: ~U[2004-02-08 06:13:00Z],
project_type: "roofing",
status: :active,
tasks: #Ecto.Association.NotLoaded<association :tasks is not loaded>,
updated_at: ~N[2022-06-13 06:35:00]
}
]