mongodb - Using mongoexport/mongoimport to export in csv format for embeded documents -


how export embeded documents in csv formats.

i use command non-embeded documents:

mongoexport --db db_name -c collection_name --csv -f "field1,field2"

but how embeded documents. suppose collection_name document has embeded_doc embeded in it.

you can still use same syntax:

if have document field name document, such name: { first: "kay" }, can still do:

mongoexport --db db_name -c collection_name --csv -f "name"  

if want export field first in embedded document name

mongoexport --db db_name -c collection_name --csv -f "name.first" 

Comments

Popular posts from this blog

php - mySql Join with 4 tables -

css - Text drops down with smaller window -

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -