I am following this example for creating a blog with Gatsby.
Throughout this tutorial, assignment notation is used like so:
export default function Index({ data }) {
const { edges: posts } = data.allMarkdownRemark
return (
<div className="blog-posts">
{posts
.filter(post => post.node.frontmatter.title.length > 0)
.map(({ node: post }) => {
return (...);
})}
</div>
)
}
Line 2, which appears to me as deconstructing assignment, is confusing to me. From what dictionary are we assigning the key edges's value posts to? Why are we able to reference posts later on without referencing it using the edges key?