Filter
Use . to access deep properties
GET /posts?title=json-server&author=typicode
GET /posts?id=1&id=2
result['packs'].filter((el)=>{return el.name == 'Название пакета' || el.author == 'Matt'})
resolve: {
alias: {
'~': path.resolve(__dirname, 'src'),
'~i': path.resolve(__dirname, 'src/images/img/icons'),
}
},
import Img from '~i/sign-out.svg';
module: {
rules: [
{
test: /\.js|jsx$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader',
options: {
presets: ['@babel/preset-env'],
plugins: [
"@babel/plugin-transform-react-jsx",
"@babel/plugin-proposal-class-properties"
]
}
}
}