42 lines
1.3 KiB
JavaScript
42 lines
1.3 KiB
JavaScript
|
|
import fs from 'fs';
|
||
|
|
|
||
|
|
const data = JSON.parse(fs.readFileSync('./网页未导入数据/环保产业/环保岗位简历.json', 'utf8'));
|
||
|
|
|
||
|
|
console.log('数据结构:');
|
||
|
|
console.log('总岗位数:', data.length);
|
||
|
|
console.log('\n前5个岗位:');
|
||
|
|
data.slice(0, 5).forEach((item, index) => {
|
||
|
|
console.log(`${index + 1}. 岗位名称: ${item['岗位名称']}`);
|
||
|
|
console.log(` 岗位群: ${item['简历岗位群']}`);
|
||
|
|
console.log(` 等级: ${item['岗位等级标签']}`);
|
||
|
|
console.log(` 批次: ${item['批次']}`);
|
||
|
|
});
|
||
|
|
|
||
|
|
// 按批次分组
|
||
|
|
const batches = {};
|
||
|
|
data.forEach(item => {
|
||
|
|
const batch = item['批次'] || '未分类';
|
||
|
|
const position = item['岗位名称'];
|
||
|
|
if (!batches[batch]) batches[batch] = [];
|
||
|
|
batches[batch].push(position);
|
||
|
|
});
|
||
|
|
|
||
|
|
console.log('\n按批次分组:');
|
||
|
|
Object.entries(batches).forEach(([batch, positions]) => {
|
||
|
|
console.log(`${batch}: ${positions.length}个岗位`);
|
||
|
|
console.log(' 岗位列表:', positions.join(', '));
|
||
|
|
});
|
||
|
|
|
||
|
|
// 按等级标签分组
|
||
|
|
const levels = {};
|
||
|
|
data.forEach(item => {
|
||
|
|
const level = item['岗位等级标签'] || '未分类';
|
||
|
|
const position = item['岗位名称'];
|
||
|
|
if (!levels[level]) levels[level] = [];
|
||
|
|
levels[level].push(position);
|
||
|
|
});
|
||
|
|
|
||
|
|
console.log('\n按岗位等级分组:');
|
||
|
|
Object.entries(levels).forEach(([level, positions]) => {
|
||
|
|
console.log(`${level}: ${positions.length}个岗位`);
|
||
|
|
});
|